diff options
author | Jeff Brown <jeffbrown@google.com> | 2014-10-07 23:53:20 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-10-07 23:53:23 +0000 |
commit | 32b9f4a650d1b8b52b85a27109f95fde030dff66 (patch) | |
tree | 7fbd491e5fb0e55baaf73657cfb9b8734693fb71 /core/java | |
parent | 7f76ff2c933d725a8867414cacfed82ad61aa630 (diff) | |
parent | 7a08fe0e09c9bd5b66049738617cc9972651bf5b (diff) | |
download | frameworks_base-32b9f4a650d1b8b52b85a27109f95fde030dff66.zip frameworks_base-32b9f4a650d1b8b52b85a27109f95fde030dff66.tar.gz frameworks_base-32b9f4a650d1b8b52b85a27109f95fde030dff66.tar.bz2 |
Merge "Reapply animation duration scale each time it is started." into lmp-dev
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/animation/ValueAnimator.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/java/android/animation/ValueAnimator.java b/core/java/android/animation/ValueAnimator.java index 9435dfb..0d17d67 100644 --- a/core/java/android/animation/ValueAnimator.java +++ b/core/java/android/animation/ValueAnimator.java @@ -508,10 +508,14 @@ public class ValueAnimator extends Animator { duration); } mUnscaledDuration = duration; - mDuration = (long)(duration * sDurationScale); + updateScaledDuration(); return this; } + private void updateScaledDuration() { + mDuration = (long)(mUnscaledDuration * sDurationScale); + } + /** * Gets the length of the animation. The default duration is 300 milliseconds. * @@ -947,6 +951,7 @@ public class ValueAnimator extends Animator { mStarted = true; mStartedDelay = false; mPaused = false; + updateScaledDuration(); // in case the scale factor has changed since creation time AnimationHandler animationHandler = getOrCreateAnimationHandler(); animationHandler.mPendingAnimations.add(this); if (mStartDelay == 0) { |