Adding some source hints when generating theme icons

Bug: 381897614
Flag: EXEMPT refactor
Test: Presubmit
Change-Id: Ief779bb04cd69372ec3acd4501e283f09de41b4d
This commit is contained in:
Sunny Goyal
2025-01-14 15:50:27 -08:00
parent bc3995222b
commit 01a976f210
3 changed files with 22 additions and 4 deletions
@@ -112,7 +112,9 @@ object CacheableShortcutCachingLogic : CachingLogic<CacheableShortcutInfo> {
?.let { d ->
li.createBadgedIconBitmap(
d,
IconOptions().setExtractedColor(Themes.getColorAccent(context)),
IconOptions()
.setExtractedColor(Themes.getColorAccent(context))
.setSourceHint(getSourceHint(info, cache)),
)
} ?: BitmapInfo.LOW_RES_INFO
}
@@ -594,7 +594,8 @@ public class IconCache extends BaseIconCache {
@VisibleForTesting
synchronized boolean isItemInDb(ComponentKey cacheKey) {
return getEntryFromDBLocked(cacheKey, new CacheEntry(), DEFAULT_LOOKUP_FLAG);
return getEntryFromDBLocked(cacheKey, new CacheEntry(), DEFAULT_LOOKUP_FLAG,
LauncherActivityCachingLogic.INSTANCE);
}
/**