Merge "Fix spring not springing when unstashing." into tm-qpr-dev

This commit is contained in:
Jon Miranda
2023-03-23 17:37:35 +00:00
committed by Android (Google) Code Review
3 changed files with 33 additions and 5 deletions

View File

@@ -553,12 +553,16 @@ public class TaskbarLauncherStateController {
animatorSet.play(stashAnimator);
}
if (isAnimatingToLauncher() || mLauncherState == LauncherState.NORMAL) {
// Translate back to 0 at a shorter or same duration as the icon alignment animation.
// This ensures there is no jump after switching to hotseat, e.g. when swiping up from
// overview to home. Currently we do duration / 2 just to make it feel snappier.
// Translate back to 0 at a shorter or same duration as the icon alignment animation.
// This ensures there is no jump after switching to hotseat, e.g. when swiping up from
// overview to home. When not in app, we do duration / 2 just to make it feel snappier.
long resetDuration = mControllers.taskbarStashController.isInApp()
? duration
: duration / 2;
if (!mControllers.taskbarTranslationController.willAnimateToZeroBefore(resetDuration)
&& (isAnimatingToLauncher() || mLauncherState == LauncherState.NORMAL)) {
animatorSet.play(mControllers.taskbarTranslationController
.createAnimToResetTranslation(duration / 2));
.createAnimToResetTranslation(resetDuration));
}
}