Updating ThemeManager to be extendible

Moving the themeController inside the iconState object

Bug: 381897614
Test: atest ThemeManagerTest
Flag: EXEMPT refactor
Change-Id: I190be0af3202e97808f5dbda30ad0ca811581881
This commit is contained in:
Sunny Goyal committed 2025-02-10 11:49:32 -08:00
1 parent 026930cd14
commit 835461a148
5 files changed
+28 -21

No files matched your search

@@ -77,7 +77,6 @@ import com.android.launcher3.dragndrop.DraggableView;
import com.android.launcher3.folder.FolderIcon;
import com.android.launcher3.graphics.IconShape;
import com.android.launcher3.graphics.PreloadIconDrawable;
import com.android.launcher3.graphics.ThemeManager;
import com.android.launcher3.icons.DotRenderer;
import com.android.launcher3.icons.FastBitmapDrawable;
import com.android.launcher3.icons.IconCache.ItemInfoUpdateReceiver;
@@ -484,9 +483,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
}
private void setNonPendingIcon(ItemInfoWithIcon info) {
ThemeManager themeManager = ThemeManager.INSTANCE.get(getContext());
int flags = (shouldUseTheme()
&& themeManager.isMonoThemeEnabled()) ? FLAG_THEMED : 0;
int flags = shouldUseTheme() ? FLAG_THEMED : 0;
// Remove badge on icons smaller than 48dp.
if (mHideBadge || mDisplay == DISPLAY_SEARCH_RESULT_SMALL) {
flags |= FLAG_NO_BADGE;