Merge "Fix flickering when cancel cross activity animation." into udc-qpr-dev am: 672de42998

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24397717

Change-Id: Id3e8f62a6f4122cae4cbd45f9ee9498e6dab68c2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Wei Sheng Shih
2023-08-14 11:05:12 +00:00
committed by Automerger Merge Worker

View File

@@ -371,7 +371,15 @@ class CrossActivityAnimation {
@Override
public void onBackCancelled() {
mProgressAnimator.onBackCancelled(CrossActivityAnimation.this::finishAnimation);
mProgressAnimator.onBackCancelled(() -> {
// mProgressAnimator can reach finish stage earlier than mLeavingProgressSpring,
// and if we release all animation leash first, the leavingProgressSpring won't
// able to update the animation anymore, which cause flicker.
// Here should force update the closing animation target to the final stage before
// release it.
setLeavingProgress(0);
finishAnimation();
});
}
@Override