Use device profile width instead of drag layer width for overview translation
This fixes the issue where overview doesn't come in from offscreen
the first time you enter overview from home.
Test:
- Force stop launcher, quick switch from home
- Force stop launcher, swipe up and hold
Change-Id: Ia4dbd36267008bc199cff088833979606238d3eb
diff --git a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
index 4f50cdb..77ac35c 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
@@ -194,7 +194,7 @@
public static ScaleAndTranslation getOverviewScaleAndTranslationForNormalState(Launcher l) {
if (SysUINavigationMode.getMode(l) == Mode.NO_BUTTON) {
- float offscreenTranslationX = l.getDragLayer().getWidth()
+ float offscreenTranslationX = l.getDeviceProfile().widthPx
- l.getOverviewPanel().getPaddingStart();
return new ScaleAndTranslation(1f, offscreenTranslationX, 0f);
}