Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3d9fdc0 authored by Steve Kondik's avatar Steve Kondik Committed by Clark Scheff
Browse files

systemui: Fix ClassCastExceptions

Change-Id: I10a90bd21e4fbf99c6eae1fa6d3ed151f0fc10f7
parent 5cac7477
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -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();
            final Drawable d = super.getDrawable(context).getConstantState().newDrawable();
            if (d instanceof AnimatedVectorDrawable) {
                ((AnimatedVectorDrawable)d).start();
                if (mAllowAnimation) {
                    mAllowAnimation = false;
                } else {
                d.stop(); // skip directly to end state
                    ((AnimatedVectorDrawable)d).stop(); // skip directly to end state
                }
            }
            return d;
        }