Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4440afb9 authored by Yein Jo's avatar Yein Jo
Browse files

Fix SpringAnimation class cast exception.

this is a hot fix for the regression caused by ag/20171590, may need more investigation to properly handle it.

Bug: 255723033
Test: Failing Tests
Change-Id: I129f69d2979405b33c8b46430c7b1ec8559105aa
parent ef6a85b1
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -219,14 +219,16 @@ public class AnimationHandler {
            return;
        }
        for (int i = 0; i < mAnimationCallbacks.size(); ++i) {
            Animator animator = ((Animator) mAnimationCallbacks.get(i));
            if (animator != null
                    && animator.getTotalDuration() == Animator.DURATION_INFINITE
            AnimationFrameCallback callback = mAnimationCallbacks.get(i);
            if (callback instanceof Animator) {
                Animator animator = ((Animator) callback);
                if (animator.getTotalDuration() == Animator.DURATION_INFINITE
                        && !animator.isPaused()) {
                    mPausedAnimators.add(animator);
                    animator.pause();
                }
            }
        }
    };

    /**