Folder preview work badge theming fix

Currently the preview apps in a folder icon have the work badge with theming even when themed icons is off

Fix: 306665193
Test: Verify that folder with work icons has non-themed work badge when themed icons is off
Flag: NONE
Change-Id: I78ca7cb2361f6e590742fa64c88397d1ea80be68
This commit is contained in:
fbaron committed 2023-11-08 12:30:58 -08:00
1 parent 9623aaa470
commit 1e360c1a92
1 file changed
+3 -1
@@ -43,6 +43,7 @@ import com.android.launcher3.Utilities;
import com.android.launcher3.graphics.PreloadIconDrawable;
import com.android.launcher3.model.data.ItemInfoWithIcon;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.util.Themes;
import com.android.launcher3.views.ActivityContext;
import java.util.ArrayList;
@@ -434,7 +435,8 @@ public class PreviewItemManager {
drawable.setLevel(item.getProgressLevel());
p.drawable = drawable;
} else {
p.drawable = item.newIcon(mContext, FLAG_THEMED);
p.drawable = item.newIcon(mContext,
Themes.isThemedIconEnabled(mContext) ? FLAG_THEMED : 0);
}
p.drawable.setBounds(0, 0, mIconSize, mIconSize);
p.item = item;