From 6586062f711a5194d22d870b66ba7e5a8467576f Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Mon, 12 Mar 2018 13:40:58 -0700 Subject: Ensuring that we finish the last transition before starting a new one. > Finishing the active animation instead of cancelling it. This ansures that the animation callbacks are called properly and RecentsAnimaiton is finished > If a transition is already running, using main thread for next transtion so that this new transition is not started before the last transition is finished. > If the transition is expected to finish at Launcher, directly use the Launcher consumer. RunningTaskInfo is not updated until the screen shot is complete. Bug: 74481901 Change-Id: I2b1128f1f2eff0e6bd94b3adb9cef6ae0578bd0c --- quickstep/src/com/android/quickstep/AnimatedFloat.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'quickstep/src/com/android/quickstep/AnimatedFloat.java') diff --git a/quickstep/src/com/android/quickstep/AnimatedFloat.java b/quickstep/src/com/android/quickstep/AnimatedFloat.java index 214b3f3b9..84dfa457e 100644 --- a/quickstep/src/com/android/quickstep/AnimatedFloat.java +++ b/quickstep/src/com/android/quickstep/AnimatedFloat.java @@ -77,6 +77,12 @@ public class AnimatedFloat { } } + public void finishAnimation() { + if (mValueAnimator != null && mValueAnimator.isRunning()) { + mValueAnimator.end(); + } + } + public ObjectAnimator getCurrentAnimation() { return mValueAnimator; } -- cgit v1.2.3