Merge "Avoid race condition during grayscale animation of QS tile"
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user