Fix cancel animation invoke callback early

Removed the redundant finish behavior when the cancel animation is
running.

Bug: 259608500
Test: atest BackProgressAnimatorTest
Change-Id: Iceab5439c974268d1688d0c556c76cad33716249
This commit is contained in:
Arthur Hung
2023-02-02 02:45:06 +00:00
parent f761035d74
commit acdcf2be37

View File

@@ -370,13 +370,7 @@ class CrossActivityAnimation {
@Override
public void onBackCancelled() {
// End the fade in animation.
mProgressAnimator.onBackCancelled(CrossActivityAnimation.this::finishAnimation);
mEnteringProgressSpring.cancel();
mLeavingProgressSpring.cancel();
// TODO (b259608500): Let BackProgressAnimator could play cancel animation.
mProgressAnimator.reset();
finishAnimation();
}
@Override