summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2014-06-13 13:43:35 -0700
committerAlan Viverette <alanv@google.com>2014-06-13 13:43:35 -0700
commit97fb0aa5090858705b66bfc4c05e7530c5d3d6b1 (patch)
tree2d78ccd33b3fceba7a1782f128278336dc3e8501 /graphics
parent4ffd507e671d417a26f3cb4e8192d19140a5b460 (diff)
downloadframeworks_base-97fb0aa5090858705b66bfc4c05e7530c5d3d6b1.zip
frameworks_base-97fb0aa5090858705b66bfc4c05e7530c5d3d6b1.tar.gz
frameworks_base-97fb0aa5090858705b66bfc4c05e7530c5d3d6b1.tar.bz2
Only start AnimationDrawable on visibility change when animating
BUG: 15532494 Change-Id: I5663fc86e64c34db84385238865e08297fb1f817
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/drawable/AnimatedStateListDrawable.java1
-rw-r--r--graphics/java/android/graphics/drawable/AnimationDrawable.java4
2 files changed, 2 insertions, 3 deletions
diff --git a/graphics/java/android/graphics/drawable/AnimatedStateListDrawable.java b/graphics/java/android/graphics/drawable/AnimatedStateListDrawable.java
index a5a074c..e1dec9d 100644
--- a/graphics/java/android/graphics/drawable/AnimatedStateListDrawable.java
+++ b/graphics/java/android/graphics/drawable/AnimatedStateListDrawable.java
@@ -537,4 +537,3 @@ public class AnimatedStateListDrawable extends StateListDrawable {
}
}
}
-
diff --git a/graphics/java/android/graphics/drawable/AnimationDrawable.java b/graphics/java/android/graphics/drawable/AnimationDrawable.java
index 16548d0..1ee0224 100644
--- a/graphics/java/android/graphics/drawable/AnimationDrawable.java
+++ b/graphics/java/android/graphics/drawable/AnimationDrawable.java
@@ -91,10 +91,10 @@ public class AnimationDrawable extends DrawableContainer implements Runnable, An
@Override
public boolean setVisible(boolean visible, boolean restart) {
- boolean changed = super.setVisible(visible, restart);
+ final boolean changed = super.setVisible(visible, restart);
if (visible) {
if (changed || restart) {
- setFrame(0, true, restart || mCurFrame >= 0);
+ setFrame(0, true, mAnimating);
}
} else {
unscheduleSelf(this);