Updating IconProvider API to use a single API to load icons

Bug: 366237794
Test: atest IconProviderTest
Flag: EXEMPT refactor, changes in underlying API

Change-Id: If8c6a4f13de7e7d262ee0b6d0c6897981f75e639
This commit is contained in:
Sunny Goyal
2024-09-20 10:16:58 -07:00
parent 24061ff74f
commit a1cebfa0c0
11 changed files with 309 additions and 12 deletions
@@ -213,8 +213,8 @@ public class DatabaseWidgetPreviewLoader {
// Draw icon in the center.
try {
Drawable icon = LauncherAppState.getInstance(mContext).getIconCache()
.getFullResIcon(info.provider.getPackageName(), info.icon);
Drawable icon = info.getFullResIcon(
LauncherAppState.getInstance(mContext).getIconCache());
if (icon != null) {
int appIconSize = dp.iconSizePx;
int iconSize = (int) Math.min(appIconSize * scale,