diff options
| author | 2014-11-12 23:40:21 +0000 | |
|---|---|---|
| committer | 2014-11-12 23:40:21 +0000 | |
| commit | c3e29108fcd87b8229cddacec98e63fe5f79efdf (patch) | |
| tree | 3318bdcd5a53161e4f3a4a9e898d12856c46ecd3 | |
| parent | 84ed482ff9a9e8f6ea6e14c978d4311f23396bc6 (diff) | |
| parent | d46cf7138a955d004911bbd637535390030b328f (diff) | |
am d46cf713: Merge "AVD: Requires all animator has stopped before start again." into lmp-mr1-dev automerge: ffcb5e2
* commit 'd46cf7138a955d004911bbd637535390030b328f':
AVD: Requires all animator has stopped before start again.
| -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 e65dbaf077b6..d0edebaf4067 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(); } |