summaryrefslogtreecommitdiffstats
path: root/iconloaderlib/src/com/android/launcher3/icons/cache/IconCacheUpdateHandler.java
diff options
context:
space:
mode:
authorPinyao Ting <pinyaoting@google.com>2019-09-16 17:56:51 +0000
committerPinyao Ting <pinyaoting@google.com>2019-09-16 18:00:26 +0000
commitf3d58f1f84192a0446ba3bf2fcfd773ad538bdde (patch)
tree8ad642272411655ee4e65f86245f056fcfc1eb53 /iconloaderlib/src/com/android/launcher3/icons/cache/IconCacheUpdateHandler.java
parent050f9b1279d924d211ba8572876e9ada55a541f0 (diff)
downloadpackages_apps_Trebuchet-f3d58f1f84192a0446ba3bf2fcfd773ad538bdde.tar.gz
packages_apps_Trebuchet-f3d58f1f84192a0446ba3bf2fcfd773ad538bdde.tar.bz2
packages_apps_Trebuchet-f3d58f1f84192a0446ba3bf2fcfd773ad538bdde.zip
Revert "cache shourtcut image"
This reverts commit 050f9b1279d924d211ba8572876e9ada55a541f0. Reason for revert: Test failure on ub-launcher3-master (b/140998509) Possible Root Cause: This happens when fallback image or default icon was used for shortcut icon, but shortcut caching logic do not have the logic to create either fallback image or default icon. So upon updating icon cache, the icon remains to be null, causing an NPE. Change-Id: I1ee3bb7a3cab2af5730c2ee77d9370c1578a9ad6
Diffstat (limited to 'iconloaderlib/src/com/android/launcher3/icons/cache/IconCacheUpdateHandler.java')
-rw-r--r--iconloaderlib/src/com/android/launcher3/icons/cache/IconCacheUpdateHandler.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/iconloaderlib/src/com/android/launcher3/icons/cache/IconCacheUpdateHandler.java b/iconloaderlib/src/com/android/launcher3/icons/cache/IconCacheUpdateHandler.java
index bcdbce5e2..3c71bd027 100644
--- a/iconloaderlib/src/com/android/launcher3/icons/cache/IconCacheUpdateHandler.java
+++ b/iconloaderlib/src/com/android/launcher3/icons/cache/IconCacheUpdateHandler.java
@@ -171,9 +171,8 @@ 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)
- && TextUtils.equals(c.getString(systemStateIndex),
+ if (version == info.versionCode && updateTime == info.lastUpdateTime &&
+ TextUtils.equals(c.getString(systemStateIndex),
mIconCache.getIconSystemState(info.packageName))) {
if (mFilterMode == MODE_CLEAR_VALID_ITEMS) {
@@ -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