Extracting icon caching logic into a base class.

This will allow using the cache cache for other type of objects,
like shortcuts and widgets.

Change-Id: I38616d031cb051f93e724d9cc0e8fe9a822b9e3a
This commit is contained in:
Sunny Goyal
2018-09-24 10:51:52 -07:00
parent d65f5f7f1a
commit 0b3053c9fc
8 changed files with 639 additions and 547 deletions

View File

@@ -20,6 +20,7 @@ import static com.android.launcher3.ItemInfoWithIcon.FLAG_DISABLED_LOCKED_USER;
import static com.android.launcher3.ItemInfoWithIcon.FLAG_DISABLED_SAFEMODE;
import static com.android.launcher3.ItemInfoWithIcon.FLAG_DISABLED_SUSPENDED;
import static com.android.launcher3.folder.ClippedFolderIconLayoutRule.MAX_NUM_ITEMS_IN_PREVIEW;
import static com.android.launcher3.icons.CachingLogic.LAUNCHER_ACTIVITY_INFO;
import static com.android.launcher3.model.LoaderResults.filterCurrentWorkspaceItems;
import android.appwidget.AppWidgetProviderInfo;
@@ -802,7 +803,7 @@ public class LoaderTask implements Runnable {
List<List<LauncherActivityInfo>> activityListPerUser) {
int userCount = activityListPerUser.size();
for (int i = 0; i < userCount; i++) {
updateHandler.updateIcons(activityListPerUser.get(i));
updateHandler.updateIcons(activityListPerUser.get(i), LAUNCHER_ACTIVITY_INFO);
}
}