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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user