Simplifying IconCache access code

Providing a way to access icon cache without LauncherAcitivtiyInfo.
This allows fetching LauncherActivityInfo only when required, thus
avoiding system RPC when the icon is already in cache.

Change-Id: I92918c7a0d0d0796e5f7b70d4ecb6787c52c6600
This commit is contained in:
Sunny Goyal
2016-12-15 17:40:07 -08:00
parent bf8a265deb
commit 3fe4a146cf
16 changed files with 163 additions and 278 deletions

View File

@@ -65,7 +65,7 @@ public class CacheDataUpdatedTask extends ExtendedModelTask {
if (si.itemType == LauncherSettings.Favorites.ITEM_TYPE_APPLICATION
&& isValidShortcut(si) && cn != null
&& mPackages.contains(cn.getPackageName())) {
iconCache.getTitleAndIcon(si, si.getPromisedIntent(), si.user, si.usingLowResIcon);
iconCache.getTitleAndIcon(si, si.usingLowResIcon);
updatedShortcuts.add(si);
}
}