From 0d1b9ea40a4803ecadca45aa39c7bc43bf3cf310 Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Tue, 17 Sep 2024 00:07:51 +0000 Subject: [PATCH] Fix taskbarIconAlignment not being part of animToLauncher Previous sequence of events when swiping home: - AbsSwipeUpHandler getParallelAnimationToLauncher() -> TaskbarLauncherStateController#createAnimToLauncher(NORMAL, ...) (but mLauncherState is still BACKGROUND_APP, so we don't play the icon alignment anim here) - AbsSwipeUpHandler#createWindowAnimationToHome -> LauncherHomeAnimationFactory#createActivityAnimationToHome() sets the state to NORMAL. - TaskbarLauncherStateController now animates the icon alignment in response to the state change, but it's a separate animation from the one created in createAnimToLauncher() - If you touch down during the transition to home, we finish the animation that was returned by createAnimToLauncher(), but that doesn't include iconAlignment so that part still plays on top To fix this, we set mLauncherState = toState in createAnimToLauncher so that the applyState picks it up and does the iconAlignment as part of that animation. Test: manual: swipe to home and immediately swipe up to All Apps (or down for notifications or right for -1), verify no Taskbar on top Flag: EXEMPT bugfix Fixes: 360116367 Change-Id: Icd9e4659812c9d77598b9214f51592ce2136b265 --- .../launcher3/taskbar/TaskbarLauncherStateController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java index 4188a0f61a..f673a4e1a6 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java @@ -295,6 +295,7 @@ public class TaskbarLauncherStateController { stashController.updateStateForFlag(FLAG_IN_APP, false); updateStateForFlag(FLAG_TRANSITION_TO_VISIBLE, true); + mLauncherState = toState; animatorSet.play(stashController.createApplyStateAnimator(duration)); animatorSet.play(applyState(duration, false));