Merge "Fix SpringAnimation class cast exception." into tm-qpr-dev am: 5ce1b5d682

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

Change-Id: I88e853ed43cba28c8ea44201d0e5b675800c7554
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Yein Jo
2022-11-09 00:48:15 +00:00
committed by Automerger Merge Worker

View File

@@ -219,12 +219,14 @@ public class AnimationHandler {
return; return;
} }
for (int i = 0; i < mAnimationCallbacks.size(); ++i) { for (int i = 0; i < mAnimationCallbacks.size(); ++i) {
Animator animator = ((Animator) mAnimationCallbacks.get(i)); AnimationFrameCallback callback = mAnimationCallbacks.get(i);
if (animator != null if (callback instanceof Animator) {
&& animator.getTotalDuration() == Animator.DURATION_INFINITE Animator animator = ((Animator) callback);
&& !animator.isPaused()) { if (animator.getTotalDuration() == Animator.DURATION_INFINITE
mPausedAnimators.add(animator); && !animator.isPaused()) {
animator.pause(); mPausedAnimators.add(animator);
animator.pause();
}
} }
} }
}; };