summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Doris Liu <tianliu@google.com> 2015-05-15 00:28:32 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2015-05-15 00:28:33 +0000
commit4b4d4757698718f785aa534b69a117007f5b64a7 (patch)
tree70fabf3e5e0a3c8204039deeb2b39076e018bf7e
parent2cdf5eaad4ad84fc87b73945fdd3262da4a0ab43 (diff)
parentc7741d467b37351ab13f75592fc7400d0c2ba6d7 (diff)
Merge "Start AnimationDrawable from the zeroth frame." into mnc-dev
-rw-r--r--graphics/java/android/graphics/drawable/AnimationDrawable.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/graphics/java/android/graphics/drawable/AnimationDrawable.java b/graphics/java/android/graphics/drawable/AnimationDrawable.java
index 871715e121b7..e1975c90312f 100644
--- a/graphics/java/android/graphics/drawable/AnimationDrawable.java
+++ b/graphics/java/android/graphics/drawable/AnimationDrawable.java
@@ -151,7 +151,9 @@ public class AnimationDrawable extends DrawableContainer implements Runnable, An
mAnimating = true;
if (!isRunning()) {
- run();
+ // Start from 0th frame.
+ setFrame(0, false, mAnimationState.getChildCount() > 1
+ || !mAnimationState.mOneShot);
}
}