diff options
author | ztenghui <ztenghui@google.com> | 2014-11-12 20:47:43 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-11-12 20:47:45 +0000 |
commit | ffcb5e210ad82e0f2a33d6644bc6690552a1785f (patch) | |
tree | 696bea8f1b4860f978e92bf5d7e09b20627b6c37 /graphics/java | |
parent | 26478bad42dd3d446131ae65ee0bf6880a950889 (diff) | |
parent | 1a40facbfd60575a3232ae49f4b05098f4ec4830 (diff) | |
download | frameworks_base-ffcb5e210ad82e0f2a33d6644bc6690552a1785f.zip frameworks_base-ffcb5e210ad82e0f2a33d6644bc6690552a1785f.tar.gz frameworks_base-ffcb5e210ad82e0f2a33d6644bc6690552a1785f.tar.bz2 |
Merge "AVD: Requires all animator has stopped before start again." into lmp-mr1-dev
Diffstat (limited to 'graphics/java')
-rw-r--r-- | graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java b/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java index e65dbaf..d0edeba 100644 --- a/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java +++ b/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java @@ -435,13 +435,16 @@ public class AnimatedVectorDrawable extends Drawable implements Animatable { @Override public void start() { + // If any one of the animator has not ended, do nothing. + if (isStarted()) { + return; + } + // Otherwise, kick off every animator. final ArrayList<Animator> animators = mAnimatedVectorState.mAnimators; final int size = animators.size(); for (int i = 0; i < size; i++) { final Animator animator = animators.get(i); - if (!animator.isStarted()) { - animator.start(); - } + animator.start(); } invalidateSelf(); } |