Using internal format cache for loading user badged label

Bug: 267683009
Test: Manual
Change-Id: I7d1df2704c4513bd80e2b6adb7a3921637fa617b
This commit is contained in:
Sunny Goyal
2023-02-02 16:11:34 -08:00
parent ac4c866538
commit efad3c2f92
2 changed files with 3 additions and 4 deletions
@@ -484,8 +484,7 @@ public class IconCache extends BaseIconCache {
WidgetSection widgetSection = WidgetSections.getWidgetSections(mContext)
.get(infoInOut.widgetCategory);
infoInOut.title = mContext.getString(widgetSection.mSectionTitle);
infoInOut.contentDescription = mPackageManager.getUserBadgedLabel(
infoInOut.title, infoInOut.user);
infoInOut.contentDescription = getUserBadgedLabel(infoInOut.title, infoInOut.user);
final BitmapInfo cachedBitmap = mWidgetCategoryBitmapInfos.get(infoInOut.widgetCategory);
if (cachedBitmap != null) {
infoInOut.bitmap = getBadgedIcon(cachedBitmap, infoInOut.user);
@@ -310,7 +310,7 @@ public class LoaderCursor extends CursorWrapper {
throw new InvalidParameterException("Invalid restoreType " + restoreFlag);
}
info.contentDescription = mPM.getUserBadgedLabel(info.title, info.user);
info.contentDescription = mIconCache.getUserBadgedLabel(info.title, info.user);
info.itemType = itemType;
info.status = restoreFlag;
return info;
@@ -381,7 +381,7 @@ public class LoaderCursor extends CursorWrapper {
}
}
info.contentDescription = mPM.getUserBadgedLabel(info.title, info.user);
info.contentDescription = mIconCache.getUserBadgedLabel(info.title, info.user);
return info;
}