From f9e46eaa151baee7f3c8724c6a9d33db0b2689fe Mon Sep 17 00:00:00 2001 From: Jon Miranda Date: Mon, 26 Aug 2024 09:40:26 -0700 Subject: [PATCH] Recreate icon alignment controller when isIconAlignedWithHotseat changes. Before: when launching an app and immediately swiping home, the icon alignment animation would become stale, which lead us to playing the wrong interpolator for the action key alpha animator. Fixes: 359579152 Test: open app, then immediately swipe home Flag: EXEMPT bugfix Change-Id: Ief08bd0fcb9fdc60efd0b8dd0821c1122cfa6f4f --- .../android/launcher3/taskbar/TaskbarViewController.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java index b8b85d120a..d9cd7a26ee 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java @@ -144,6 +144,7 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar private Runnable mOnControllerPreCreateCallback = NO_OP; // Stored here as signals to determine if the mIconAlignController needs to be recreated. + private boolean mIsIconAlignedWithHotseat; private boolean mIsHotseatIconOnTopWhenAligned; private boolean mIsStashed; @@ -681,15 +682,17 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar mIconAlignControllerLazy = null; return; } - boolean isHotseatIconOnTopWhenAligned = mControllers.uiController.isHotseatIconOnTopWhenAligned(); + boolean isIconAlignedWithHotseat = mControllers.uiController.isIconAlignedWithHotseat(); boolean isStashed = mControllers.taskbarStashController.isStashed(); - // Re-create animation when mIsHotseatIconOnTopWhenAligned or mIsStashed changes. + // Re-create animation when any of these values change. if (mIconAlignControllerLazy == null || mIsHotseatIconOnTopWhenAligned != isHotseatIconOnTopWhenAligned + || mIsIconAlignedWithHotseat != isIconAlignedWithHotseat || mIsStashed != isStashed) { mIsHotseatIconOnTopWhenAligned = isHotseatIconOnTopWhenAligned; + mIsIconAlignedWithHotseat = isIconAlignedWithHotseat; mIsStashed = isStashed; mIconAlignControllerLazy = createIconAlignmentController(launcherDp); }