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

This commit is contained in:
Treehugger Robot
2017-09-08 14:38:31 +00:00
committed by Gerrit Code Review

View File

@@ -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 {