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

This reverts commit d13f0c5c45.

Reason for revert: app crashes when adding widgets automatically b/141568904

Change-Id: I5b97f440716c93b1bd93c899e3e1d40e8bbd2885
This commit is contained in:
Pinyao Ting
2019-10-01 16:35:17 +00:00
parent 4c420047cf
commit 52908c9adc
6 changed files with 15 additions and 120 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