Auto-stash taskbar when locking device

This greatly reduces the the jank of the taskbar being shown above the
lockscreen.

Before: http://shortn/_PhXhkWR73t
After: http://shortn/_MC3ZLGHp4o

Bug: 264604213
Test: manual (http://shortn/_ISEXThUFM2), tapl
Change-Id: Ib1c5dbaafd4d0e1d69fbc03d908632e0275c8a0b
This commit is contained in:
Mike Schneider
2023-03-22 14:26:25 +01:00
parent 906ad8b853
commit ba19f31669
3 changed files with 27 additions and 8 deletions

View File

@@ -457,8 +457,13 @@ public class TaskbarLauncherStateController {
animatorSet.play(mTaskbarCornerRoundness.animateToValue(cornerRoundness));
}
if (hasAnyFlag(changedFlags, FLAG_DEVICE_LOCKED)) {
// When transitioning between locked/unlocked, there is no stashing animation.
// Keep isUnlockTransition in sync with its counterpart in
// TaskbarStashController#createAnimToIsStashed.
boolean isUnlockTransition =
hasAnyFlag(changedFlags, FLAG_DEVICE_LOCKED) && !hasAnyFlag(FLAG_DEVICE_LOCKED);
if (isUnlockTransition) {
// When transitioning to unlocked, ensure the hotseat is fully visible from the
// beginning. The hotseat itself is animated by LauncherUnlockAnimationController.
mIconAlignment.cancelAnimation();
// updateValue ensures onIconAlignmentRatioChanged will be called if there is an actual
// change in value