From d4ed2f7717d7963640ba3f0f3564b330e8d03ad8 Mon Sep 17 00:00:00 2001 From: Tracy Zhou Date: Sat, 9 Apr 2022 17:42:53 -0700 Subject: [PATCH] Update task bar icon alignment logic when launcher is paused and resumed in Overview If launcher is paused and resumed in overview, goingToUnstashedLauncherStateChanged doesn't change, so we should not use goingToUnstashedLauncherState as a signal for the end value of mIconAlignmentForResumedState anim Bug: 223109070 Test: go to overview, use the share functionality, share to drive, and make sure task bar ends up in stashed state. Making sure that it never unstashes is out of scope for this change Change-Id: I5684be6b58279a9b41e257dd72591f7d692c2fbc --- .../launcher3/taskbar/TaskbarLauncherStateController.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java index eed67b62c2..df0eb1fba8 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java @@ -257,7 +257,10 @@ import java.util.function.Supplier; if (hasAnyFlag(changedFlags, FLAG_RESUMED) || launcherStateChangedDuringAnimToResumeAlignment) { boolean isResumed = isResumed(); - float toAlignmentForResumedState = isResumed && goingToUnstashedLauncherState() ? 1 : 0; + // If launcher is resumed, we show the icons when going to an unstashed launcher state + // or launcher state is not changed (e.g. in overview, launcher is paused and resumed). + float toAlignmentForResumedState = isResumed && (goingToUnstashedLauncherState() + || !goingToUnstashedLauncherStateChanged) ? 1 : 0; // If we're already animating to the value, just leave it be instead of restarting it. if (!mIconAlignmentForResumedState.isAnimatingToValue(toAlignmentForResumedState)) { ObjectAnimator resumeAlignAnim = mIconAlignmentForResumedState