diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java index 932b329007..1995dbb319 100644 --- a/src/com/android/launcher3/BubbleTextView.java +++ b/src/com/android/launcher3/BubbleTextView.java @@ -365,10 +365,13 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, mBubbleTextHolder = bubbleTextHolder; } + public boolean shouldUseTheme() { + return mDisplay == DISPLAY_WORKSPACE || mDisplay == DISPLAY_FOLDER || mDisplay == DISPLAY_TASKBAR; + } + @UiThread protected void applyIconAndLabel(ItemInfoWithIcon info) { - boolean useTheme = mDisplay == DISPLAY_WORKSPACE || mDisplay == DISPLAY_FOLDER - || mDisplay == DISPLAY_TASKBAR; + boolean useTheme = shouldUseTheme(); FastBitmapDrawable iconDrawable = info.newIcon(getContext(), useTheme); mDotParams.color = IconPalette.getMutedColor(iconDrawable.getIconColor(), 0.54f); diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java index 5b747f5dd8..b276446703 100644 --- a/src/com/android/launcher3/Utilities.java +++ b/src/com/android/launcher3/Utilities.java @@ -702,6 +702,15 @@ public final class Utilities { return icon; } + public static Drawable getFullDrawable(Context context, ItemInfo info, int width, int height, + Object[] outObj, boolean useTheme) { + Drawable icon = loadFullDrawableWithoutTheme(context, info, width, height, outObj); + if (useTheme && icon instanceof BitmapInfo.Extender) { + icon = ((BitmapInfo.Extender) icon).getThemedDrawable(context); + } + return icon; + } + public static Drawable loadFullDrawableWithoutTheme(Context context, ItemInfo info, int width, int height, Object[] outObj) { ActivityContext activity = ActivityContext.lookupContext(context); diff --git a/src/com/android/launcher3/views/FloatingIconView.java b/src/com/android/launcher3/views/FloatingIconView.java index dc3ee43548..acbf279f3f 100644 --- a/src/com/android/launcher3/views/FloatingIconView.java +++ b/src/com/android/launcher3/views/FloatingIconView.java @@ -273,7 +273,9 @@ public class FloatingIconView extends FrameLayout implements int width = (int) pos.width(); int height = (int) pos.height(); if (supportsAdaptiveIcons) { - drawable = getFullDrawable(l, info, width, height, sTmpObjArray); + boolean useTheme = originalView instanceof BubbleTextView + && ((BubbleTextView) originalView).shouldUseTheme(); + drawable = getFullDrawable(l, info, width, height, sTmpObjArray, useTheme); if (drawable instanceof AdaptiveIconDrawable) { badge = getBadge(l, info, sTmpObjArray[0]); } else {