diff options
-rw-r--r-- | src/com/android/launcher3/FirstFrameAnimatorHelper.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/launcher3/FirstFrameAnimatorHelper.java b/src/com/android/launcher3/FirstFrameAnimatorHelper.java index f4c49d77a..095c5631d 100644 --- a/src/com/android/launcher3/FirstFrameAnimatorHelper.java +++ b/src/com/android/launcher3/FirstFrameAnimatorHelper.java @@ -92,12 +92,14 @@ public class FirstFrameAnimatorHelper extends AnimatorListenerAdapter } final long currentPlayTime = animation.getCurrentPlayTime(); + boolean isFinalFrame = Float.compare(1f, animation.getAnimatedFraction()) == 0; + if (!mHandlingOnAnimationUpdate && sVisible && - // If the current play time exceeds the duration, the animation - // will get finished, even if we call setCurrentPlayTime -- therefore + // If the current play time exceeds the duration, or the animated fraction is 1, + // the animation will get finished, even if we call setCurrentPlayTime -- therefore // don't adjust the animation in that case - currentPlayTime < animation.getDuration()) { + currentPlayTime < animation.getDuration() && !isFinalFrame) { mHandlingOnAnimationUpdate = true; long frameNum = sGlobalFrameCounter - mStartFrame; // If we haven't drawn our first frame, reset the time to t = 0 |