Snap for 9919854 from ecb55ef4719fd8b25231225bf15b297f7afe047c to tm-qpr3-release
Change-Id: I4a77cab0d24ba5389866e8f48aedded560114976
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java
index 58cb558..c9e7df4 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java
@@ -642,8 +642,14 @@
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));
}