OSDN Git Service

Mutate system shortcut icons in popup before tinting
authorTony Wickham <twickham@google.com>
Thu, 20 Apr 2017 21:19:24 +0000 (14:19 -0700)
committerTony Wickham <twickham@google.com>
Thu, 20 Apr 2017 21:19:24 +0000 (14:19 -0700)
Bug: 36865701
Change-Id: Ib5b45fe796b03a9a4a21f1eff90a2c75479ac62e

src/com/android/launcher3/popup/SystemShortcut.java

index de88499..4ccee4a 100644 (file)
@@ -31,7 +31,7 @@ public abstract class SystemShortcut {
     }
 
     public Drawable getIcon(Context context, int colorAttr) {
-        Drawable icon = context.getResources().getDrawable(mIconResId);
+        Drawable icon = context.getResources().getDrawable(mIconResId, context.getTheme()).mutate();
         icon.setTint(Themes.getAttrColor(context, colorAttr));
         return icon;
     }