Merge "Avoid race condition during grayscale animation of QS tile" am: bceee1cbb4 am: 36f27fa6f8
am: 24220265ca
Change-Id: Idbd4a2ca541a44c4806d9ce921600740a0e8ca14
This commit is contained in:
@@ -451,15 +451,22 @@ public abstract class QSTileImpl<TState extends State> implements QSTile {
|
|||||||
|
|
||||||
public static class DrawableIcon extends Icon {
|
public static class DrawableIcon extends Icon {
|
||||||
protected final Drawable mDrawable;
|
protected final Drawable mDrawable;
|
||||||
|
protected final Drawable mInvisibleDrawable;
|
||||||
|
|
||||||
public DrawableIcon(Drawable drawable) {
|
public DrawableIcon(Drawable drawable) {
|
||||||
mDrawable = drawable;
|
mDrawable = drawable;
|
||||||
|
mInvisibleDrawable = drawable.getConstantState().newDrawable();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Drawable getDrawable(Context context) {
|
public Drawable getDrawable(Context context) {
|
||||||
return mDrawable;
|
return mDrawable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Drawable getInvisibleDrawable(Context context) {
|
||||||
|
return mInvisibleDrawable;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class DrawableIconWithRes extends DrawableIcon {
|
public static class DrawableIconWithRes extends DrawableIcon {
|
||||||
|
|||||||
Reference in New Issue
Block a user