summaryrefslogtreecommitdiffstats
path: root/core/java/android/animation
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2012-09-12 16:33:26 -0700
committerChet Haase <chet@google.com>2012-09-12 16:33:26 -0700
commit4dd176864310e1d9519bf6b88918913e9927984f (patch)
treea781d631c16bc7917ef36ae0861d49827371775d /core/java/android/animation
parentd428e95eb5bb0fe9ee4984c89c28bea3aff1b259 (diff)
downloadframeworks_base-4dd176864310e1d9519bf6b88918913e9927984f.zip
frameworks_base-4dd176864310e1d9519bf6b88918913e9927984f.tar.gz
frameworks_base-4dd176864310e1d9519bf6b88918913e9927984f.tar.bz2
end() a reverse()'d animation correctly
Previously, an animator that had been reverse()'d (and was thus playing backwards) would not end() at the right value. That is, a call to end() would cause the animation to snap to its original end value, not the reverse-playing end value (i.e., its start value). Logic to handle calculating the proper end value was not taking the reversing behavior into account. Issue #6583656 When you call end() after calling reverse() on an animation that has not started leads to forward animation finishing. Change-Id: Ifca60a32d4973c21b85aed9c459f802526c0207e
Diffstat (limited to 'core/java/android/animation')
-rwxr-xr-xcore/java/android/animation/ValueAnimator.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/core/java/android/animation/ValueAnimator.java b/core/java/android/animation/ValueAnimator.java
index f874d56..f7460c4 100755
--- a/core/java/android/animation/ValueAnimator.java
+++ b/core/java/android/animation/ValueAnimator.java
@@ -958,13 +958,7 @@ public class ValueAnimator extends Animator {
} else if (!mInitialized) {
initAnimation();
}
- // The final value set on the target varies, depending on whether the animation
- // was supposed to repeat an odd number of times
- if (mRepeatCount > 0 && (mRepeatCount & 0x01) == 1) {
- animateValue(0f);
- } else {
- animateValue(1f);
- }
+ animateValue(mPlayingBackwards ? 0f : 1f);
endAnimation(handler);
}