Merge "Fix problems with early ending of Sequencer"

This commit is contained in:
Chet Haase
2010-08-26 14:20:01 -07:00
committed by Android (Google) Code Review
2 changed files with 5 additions and 0 deletions

View File

@@ -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();

View File

@@ -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();