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

Commit b04a0e57 authored by George Mount's avatar George Mount
Browse files

Ensure Animators and AnimatorSets run together are sync'd

Bug 18122022

Previously, each animator would wait a frame after it was
started the animation was actually started. This is fine
for the first frame of an animation, but when it is within
an AnimatorSet, each animator will add a frame of delay.
This skews the animations so that they can no longer be
synchronized.

This CL refrains from waiting for an animation frame when it
is started during the animator callback and just start
the animation immediately on that frame.

Change-Id: I007dad9aef7596f0e954377a36a17afd4801b7fe
parent 5014eb50
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -135,9 +135,8 @@ public class AnimationHandler {
    }

    private void doAnimationFrame(long frameTime) {
        int size = mAnimationCallbacks.size();
        long currentTime = SystemClock.uptimeMillis();
        for (int i = 0; i < size; i++) {
        for (int i = 0; i < mAnimationCallbacks.size(); i++) {
            final AnimationFrameCallback callback = mAnimationCallbacks.get(i);
            if (callback == null) {
                continue;