summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Kensuke Matsui <kensuke.matsui@sony.com> 2017-09-08 14:53:38 +0000
committer android-build-merger <android-build-merger@google.com> 2017-09-08 14:53:38 +0000
commit36f27fa6f846a79b6a949964a30da6470a9914b7 (patch)
tree471494a34828e9af9851e45250cea403a654a6f6
parentb10edc74aeb036d505978e48fd58408b994f179a (diff)
parentbceee1cbb43a9888559d00e866eb71dea85305b7 (diff)
Merge "Avoid race condition during grayscale animation of QS tile"
am: bceee1cbb4 Change-Id: I9a2cddd23d79c1cdd1cee75769f8589be1c9492d
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileImpl.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileImpl.java b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileImpl.java
index 672f2c2df06e..3495f570cc2c 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileImpl.java
@@ -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 {