From 8312866779168e65c7f9fe319016f70d2d567048 Mon Sep 17 00:00:00 2001 From: Tony Date: Mon, 13 May 2019 13:39:07 -0500 Subject: [PATCH] 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 --- quickstep/src/com/android/launcher3/uioverrides/UiFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java index 4f50cdb614..77ac35c50a 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java +++ b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java @@ -194,7 +194,7 @@ public class UiFactory extends RecentsUiFactory { 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); }