Null check in flushInvalidIcons
> Icons in a CacheEntry can be null, for a restored app. No
need to flush such entries on DeviceProfileChange
Bug: 17489687
Change-Id: If6e76206ae5bd8201c9928257706224f2f34c232
diff --git a/src/com/android/launcher3/IconCache.java b/src/com/android/launcher3/IconCache.java
index ddc1bd9..8a3c319 100644
--- a/src/com/android/launcher3/IconCache.java
+++ b/src/com/android/launcher3/IconCache.java
@@ -229,7 +229,8 @@
Iterator<Entry<CacheKey, CacheEntry>> it = mCache.entrySet().iterator();
while (it.hasNext()) {
final CacheEntry e = it.next().getValue();
- if (e.icon.getWidth() < grid.iconSizePx || e.icon.getHeight() < grid.iconSizePx) {
+ if ((e.icon != null) && (e.icon.getWidth() < grid.iconSizePx
+ || e.icon.getHeight() < grid.iconSizePx)) {
it.remove();
}
}