summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-01-07 00:06:33 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-01-07 00:06:33 +0000
commitd68101a3e72cb65afc9b3f1279942cdc62d14b58 (patch)
treea1637c9824bfed180ee375ff54943c1563c8d75b
parentff484d39e8ea4196bb6bc48a3ef5ba77433ad959 (diff)
parentfabee8386fd90349d7a66feb50e073d8f5e642b7 (diff)
downloadsystemui-android12L-s1-release.tar.gz
Change-Id: I3b6cf7e385b5c143f11861e30f5066208b04a707
-rw-r--r--iconloaderlib/src/com/android/launcher3/icons/cache/BaseIconCache.java9
1 files changed, 8 insertions, 1 deletions
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 @@ public abstract class BaseIconCache {
// (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);