Snap for 8050481 from fabee8386fd90349d7a66feb50e073d8f5e642b7 to sc-v2-release
Change-Id: I3b6cf7e385b5c143f11861e30f5066208b04a707
diff --git a/iconloaderlib/src/com/android/launcher3/icons/cache/BaseIconCache.java b/iconloaderlib/src/com/android/launcher3/icons/cache/BaseIconCache.java
index ecf0bca..7c4624d 100644
--- a/iconloaderlib/src/com/android/launcher3/icons/cache/BaseIconCache.java
+++ b/iconloaderlib/src/com/android/launcher3/icons/cache/BaseIconCache.java
@@ -265,7 +265,14 @@
// (e.g. fallback icon, default icon). So we drop here since there's no point in caching
// an empty entry.
if (entry.bitmap.isNullOrLowRes()) return;
- entry.title = cachingLogic.getLabel(object);
+
+ CharSequence entryTitle = cachingLogic.getLabel(object);
+ if (entryTitle == null) {
+ Log.d(TAG, "No label returned from caching logic instance: " + cachingLogic);
+ return;
+ }
+ entry.title = entryTitle;
+
entry.contentDescription = mPackageManager.getUserBadgedLabel(entry.title, user);
if (cachingLogic.addToMemCache()) mCache.put(key, entry);