summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/java/android/graphics/drawable/AnimatedImageDrawable.java3
-rw-r--r--libs/hwui/hwui/AnimatedImageDrawable.cpp3
2 files changed, 5 insertions, 1 deletions
diff --git a/graphics/java/android/graphics/drawable/AnimatedImageDrawable.java b/graphics/java/android/graphics/drawable/AnimatedImageDrawable.java
index 4328109937c1..bd49b87ec200 100644
--- a/graphics/java/android/graphics/drawable/AnimatedImageDrawable.java
+++ b/graphics/java/android/graphics/drawable/AnimatedImageDrawable.java
@@ -319,7 +319,8 @@ public class AnimatedImageDrawable extends Drawable implements Animatable2 {
/**
* Start the animation.
*
- * <p>Does nothing if the animation is already running.
+ * <p>Does nothing if the animation is already running. If the animation is stopped,
+ * this will reset it.</p>
*
* <p>If the animation starts, this will call
* {@link Animatable2.AnimationCallback#onAnimationStart}.</p>
diff --git a/libs/hwui/hwui/AnimatedImageDrawable.cpp b/libs/hwui/hwui/AnimatedImageDrawable.cpp
index 264b95e0e6dc..5356d3bfc7c9 100644
--- a/libs/hwui/hwui/AnimatedImageDrawable.cpp
+++ b/libs/hwui/hwui/AnimatedImageDrawable.cpp
@@ -41,6 +41,9 @@ bool AnimatedImageDrawable::start() {
return false;
}
+ // This will trigger a reset.
+ mFinished = true;
+
mRunning = true;
return true;
}