diff options
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/qs/QSTile.java')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/QSTile.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTile.java b/packages/SystemUI/src/com/android/systemui/qs/QSTile.java index b330582..3202250 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSTile.java @@ -402,13 +402,14 @@ public abstract class QSTile<TState extends State> implements Listenable { @Override public Drawable getDrawable(Context context) { // workaround: get a clean state for every new AVD - final AnimatedVectorDrawable d = (AnimatedVectorDrawable) context.getDrawable(mResId) - .getConstantState().newDrawable(); - d.start(); - if (mAllowAnimation) { - mAllowAnimation = false; - } else { - d.stop(); // skip directly to end state + final Drawable d = super.getDrawable(context).getConstantState().newDrawable(); + if (d instanceof AnimatedVectorDrawable) { + ((AnimatedVectorDrawable)d).start(); + if (mAllowAnimation) { + mAllowAnimation = false; + } else { + ((AnimatedVectorDrawable)d).stop(); // skip directly to end state + } } return d; } |