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

Commit 77b17547 authored by Jon Miranda's avatar Jon Miranda
Browse files

Move setCurrentPlayTime before starting animation.

Otherwise when animations are turned off, the animation will start/end
and then gets stuck to the first frame of the animation.

Fixes: 278046913
Change-Id: I5f0ed4b99ab4737b5371d65754d1acb4fdb8edb0
Flag: none
Test: swipe to go home
parent a68cd72a
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -196,14 +196,13 @@ public class LauncherAnimationRunner extends RemoteAnimationRunnerCompat {
                        finish();
                        finish();
                    }
                    }
                });
                });
                mAnimator.start();

                if (skipFirstFrame) {
                if (skipFirstFrame) {
                    // Because t=0 has the app icon in its original spot, we can skip the
                    // Because t=0 has the app icon in its original spot, we can skip the
                    // first frame and have the same movement one frame earlier.
                    // first frame and have the same movement one frame earlier.
                    mAnimator.setCurrentPlayTime(
                    mAnimator.setCurrentPlayTime(
                            Math.min(getSingleFrameMs(context), mAnimator.getTotalDuration()));
                            Math.min(getSingleFrameMs(context), mAnimator.getTotalDuration()));
                }
                }
                mAnimator.start();
            }
            }
        }
        }