Revert "Revert "Revert "Revert "Revert "cache shourtcut image"""""

This reverts commit 28dc8de660.

Reason for revert: the code change introduces significant delay when saving deep shortcut icons in cache.

Change-Id: I5d67ac0c4c867a40e882b7a46be446f8f7f63ac7
This commit is contained in:
Pinyao Ting
2019-10-16 19:50:59 +00:00
parent 55395ea8f6
commit 7242db1a7c
6 changed files with 12 additions and 118 deletions
@@ -171,8 +171,7 @@ public class IconCacheUpdateHandler {
long updateTime = c.getLong(indexLastUpdate);
int version = c.getInt(indexVersion);
T app = componentMap.remove(component);
if (version == info.versionCode
&& updateTime == cachingLogic.getLastUpdatedTime(app, info)
if (version == info.versionCode && updateTime == info.lastUpdateTime
&& TextUtils.equals(c.getString(systemStateIndex),
mIconCache.getIconSystemState(info.packageName))) {
@@ -232,6 +231,7 @@ public class IconCacheUpdateHandler {
}
}
/**
* A runnable that updates invalid icons and adds missing icons in the DB for the provided
* LauncherActivityInfo list. Items are updated/added one at a time, so that the