From ecb55ef4719fd8b25231225bf15b297f7afe047c Mon Sep 17 00:00:00 2001 From: Jon Miranda Date: Fri, 7 Apr 2023 11:44:33 -0700 Subject: [PATCH] Fix bug where taskbar is translated during hotseat handoff. Fixes: 277271088 Test: be in app swipe up from bottom to top of screen without pausing then release observe taskbar -> hotseat handoff observe no jump Change-Id: I2bb9d93d39215ca3653e2e4353391b50b7ab6417 --- .../taskbar/TaskbarLauncherStateController.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java index 58cb558a40..c9e7df45a1 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java @@ -642,8 +642,14 @@ public class TaskbarLauncherStateController { long resetDuration = mControllers.taskbarStashController.isInApp() ? duration : duration / 2; - if (mControllers.taskbarTranslationController.shouldResetBackToZero(resetDuration) - && (isAnimatingToLauncher() || mLauncherState == LauncherState.NORMAL)) { + boolean shouldReset = + mControllers.taskbarTranslationController.shouldResetBackToZero(resetDuration); + boolean goingToLauncher = isAnimatingToLauncher(); + boolean isNormalState = mLauncherState == LauncherState.NORMAL; + // Taskbar should always reset when animating to launcher in normal state to ensure there + // is no jump during the handoff to the hotseat. + if ((goingToLauncher && isNormalState) + || (shouldReset && (goingToLauncher || isNormalState))) { animatorSet.play(mControllers.taskbarTranslationController .createAnimToResetTranslation(resetDuration)); }