diff options
author | Chet Haase <chet@google.com> | 2013-09-06 07:59:36 -0700 |
---|---|---|
committer | Chet Haase <chet@google.com> | 2013-09-06 07:59:36 -0700 |
commit | f43fb2a57f152b5760d8792fec26f36d46b23817 (patch) | |
tree | 4f4ede555b2bb0967201e05c016cb7ea8db9768b /core | |
parent | 2a59f3f24076d96cbb10e1c00c3264dec43f19b1 (diff) | |
download | frameworks_base-f43fb2a57f152b5760d8792fec26f36d46b23817.zip frameworks_base-f43fb2a57f152b5760d8792fec26f36d46b23817.tar.gz frameworks_base-f43fb2a57f152b5760d8792fec26f36d46b23817.tar.bz2 |
Reversing immediately after starting animator ends it
Previously, an animator that had started but not yet played its
first frame would be reversed from its end state, which was not the
desired behavior. Now, we detect that condition (started, but not yet
actually running) and simply end() the animator immediately.
Issue #10136266 ValueAnimator.reverse right after calling start() does the full animation
Change-Id: I2a48d267336241ce74079c75758026c6f07ebc3a
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/animation/ValueAnimator.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/java/android/animation/ValueAnimator.java b/core/java/android/animation/ValueAnimator.java index 6394299..86da673 100644 --- a/core/java/android/animation/ValueAnimator.java +++ b/core/java/android/animation/ValueAnimator.java @@ -1027,6 +1027,8 @@ public class ValueAnimator extends Animator { long currentPlayTime = currentTime - mStartTime; long timeLeft = mDuration - currentPlayTime; mStartTime = currentTime - timeLeft; + } else if (mStarted) { + end(); } else { start(true); } |