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

Commit bceee1cb authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Avoid race condition during grayscale animation of QS tile"

parents 8c3e12a9 5a58cf92
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -439,15 +439,22 @@ public abstract class QSTileImpl<TState extends State> implements QSTile {

    public static class DrawableIcon extends Icon {
        protected final Drawable mDrawable;
        protected final Drawable mInvisibleDrawable;

        public DrawableIcon(Drawable drawable) {
            mDrawable = drawable;
            mInvisibleDrawable = drawable.getConstantState().newDrawable();
        }

        @Override
        public Drawable getDrawable(Context context) {
            return mDrawable;
        }

        @Override
        public Drawable getInvisibleDrawable(Context context) {
            return mInvisibleDrawable;
        }
    }

    public static class DrawableIconWithRes extends DrawableIcon {