Fix SUW unstash animation.
- Defer any UI updates to taskbar after the SUW unstash animation is created. - Predicted app icons take longer to load, so it's possible that they are added after the animation is created. - This avoids the case where icons are seemingly in the taskbar but do not get animated like the rest of the icons. - We also need to call onAnimationStart for the reveal animation immediately, otherwise the clipToOutline params never get set. Bug: 277712185 Test: flash device, very quickly go through SUW Change-Id: I4c3089da0d20bf91672e2305655c4c37b1f367aa
This commit is contained in:
1 parent
21339533b1
commit
0aef6981ac
3 files changed
+61
-6
No files matched your search
@@ -586,10 +586,14 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
|
||||
* actually be used since this animation tracks a swipe progress.
|
||||
*/
|
||||
protected void addUnstashToHotseatAnimation(AnimatorSet animation, int placeholderDuration) {
|
||||
// Defer any UI updates now to avoid the UI becoming stale when the animation plays.
|
||||
mControllers.taskbarViewController.setDeferUpdatesForSUW(true);
|
||||
createAnimToIsStashed(
|
||||
/* isStashed= */ false,
|
||||
placeholderDuration,
|
||||
TRANSITION_UNSTASH_SUW_MANUAL);
|
||||
animation.addListener(AnimatorListeners.forEndCallback(
|
||||
() -> mControllers.taskbarViewController.setDeferUpdatesForSUW(false)));
|
||||
animation.play(mAnimator);
|
||||
}
|
||||
|
||||
@@ -805,7 +809,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
|
||||
}
|
||||
|
||||
mControllers.taskbarViewController.addRevealAnimToIsStashed(skippable, isStashed, duration,
|
||||
EMPHASIZED);
|
||||
EMPHASIZED, animationType == TRANSITION_UNSTASH_SUW_MANUAL);
|
||||
|
||||
play(skippable, mControllers.stashedHandleViewController
|
||||
.createRevealAnimToIsStashed(isStashed), 0, duration, EMPHASIZED);
|
||||
|
||||
Reference in new issue
Block a user