Refactor DeviceProfile tests based on dump() and use real device dimensions for tests.

- Added roundPxValueFromFloat when converting dp/sp to px to deterministically round up values around .5

Fix: 240133465
Bug: 237542518
Test: DeviceProfileTest.kt
Change-Id: If4239f714487fe5bf2ef44274e2ce415bd75c86d
This commit is contained in:
Pat Manning authored and Alex Chau committed 2022-08-01 17:54:43 +00:00
1 parent 8157be497d
commit 5f74bfd76d
23 files changed
+1802 -5914

No files matched your search

@@ -52,7 +52,7 @@ public class SpringLoadedState extends LauncherState {
}
float shrunkTop = grid.getCellLayoutSpringLoadShrunkTop();
float scale = grid.getWorkspaceSpringLoadScale();
float scale = grid.getWorkspaceSpringLoadScale(launcher);
float halfHeight = ws.getHeight() / 2;
float myCenter = ws.getTop() + halfHeight;