Merge "AVD: Requires all animator has stopped before start again." into lmp-mr1-dev
automerge: ffcb5e2
* commit 'ffcb5e210ad82e0f2a33d6644bc6690552a1785f':
AVD: Requires all animator has stopped before start again.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user