summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Chet Haase <chet@google.com> 2010-08-26 12:05:20 -0700
committer Chet Haase <chet@google.com> 2010-08-26 13:59:20 -0700
commitf1b9b464216d2fac634be9c6aa8605d7c9ed5b68 (patch)
tree57f9696aa352dc3fb2593b88840be24c2d3c075e
parentb79c2718577422d278b063f83964881ce4207c94 (diff)
Fix problems with early ending of Sequencer
Change-Id: Ib7548059ee3d3d713b78f86a2d290be4397c167d
-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();