summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Chet Haase <chet@google.com> 2010-08-26 14:20:01 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2010-08-26 14:20:01 -0700
commitd7c2f623fe92fd755c7810bceeb1749dc6e8130d (patch)
treecd06ee34ee3b9770bf3cadc6a643b49f4095843f
parentba4da86add74aab16e3cf204dcf7ea25adbbaafa (diff)
parentf1b9b464216d2fac634be9c6aa8605d7c9ed5b68 (diff)
Merge "Fix problems with early ending of Sequencer"
-rwxr-xr-xcore/java/android/animation/Animator.java1
-rw-r--r--core/java/android/animation/Sequencer.java4
2 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/animation/Animator.java b/core/java/android/animation/Animator.java
index 71b6d99c9172..717fc0aac03e 100755
--- a/core/java/android/animation/Animator.java
+++ b/core/java/android/animation/Animator.java
@@ -669,6 +669,7 @@ public class Animator<T> extends Animatable {
setCurrentPlayTime(getCurrentPlayTime());
}
mPlayingState = STOPPED;
+ mStartedDelay = false;
sPendingAnimations.add(this);
if (sAnimationHandler == null) {
sAnimationHandler = new AnimationHandler();
diff --git a/core/java/android/animation/Sequencer.java b/core/java/android/animation/Sequencer.java
index a9e4e3bbf7dd..63ec94078dd9 100644
--- a/core/java/android/animation/Sequencer.java
+++ b/core/java/android/animation/Sequencer.java
@@ -233,6 +233,10 @@ public final class Sequencer extends Animatable {
@Override
public void end() {
mCanceled = true;
+ if (mSortedNodes.size() != mNodes.size()) {
+ // hasn't been started yet - sort the nodes now, then end them
+ sortNodes();
+ }
if (mSortedNodes.size() > 0) {
for (Node node : mSortedNodes) {
node.animation.end();