Merge "Postpone destroying leash until after cancel callback."
This commit is contained in:
committed by
Android (Google) Code Review
commit
e1f2384819
@@ -251,7 +251,7 @@ class SurfaceAnimator {
|
||||
if (DEBUG_ANIM) Slog.i(TAG, "Cancelling animation restarting=" + restarting);
|
||||
final SurfaceControl leash = mLeash;
|
||||
final AnimationAdapter animation = mAnimation;
|
||||
reset(t, forwardCancel);
|
||||
reset(t, false);
|
||||
if (animation != null) {
|
||||
if (!mAnimationStartDelayed && forwardCancel) {
|
||||
animation.onAnimationCancelled(leash);
|
||||
@@ -260,6 +260,12 @@ class SurfaceAnimator {
|
||||
mAnimationFinishedCallback.run();
|
||||
}
|
||||
}
|
||||
|
||||
if (forwardCancel && leash != null) {
|
||||
t.remove(leash);
|
||||
mService.scheduleAnimationLocked();
|
||||
}
|
||||
|
||||
if (!restarting) {
|
||||
mAnimationStartDelayed = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user