Merge "Bugfix: Add null safety when accessing icon database for main activities for LoaderTask loadAllApps." into 24D1-dev
This commit is contained in:
commit
aca99b60ab
1 file changed
+15
-10
@@ -469,17 +469,22 @@ public class IconCache extends BaseIconCache {
|
||||
duplicateIconRequestsMap.get(cn);
|
||||
|
||||
if (cn != null) {
|
||||
CacheEntry entry = cacheLocked(
|
||||
cn,
|
||||
/* user = */ sectionKey.first,
|
||||
() -> duplicateIconRequests.get(0).launcherActivityInfo,
|
||||
mLauncherActivityInfoCachingLogic,
|
||||
c,
|
||||
/* usePackageIcon= */ false,
|
||||
/* useLowResIcons = */ sectionKey.second);
|
||||
if (duplicateIconRequests != null) {
|
||||
CacheEntry entry = cacheLocked(
|
||||
cn,
|
||||
/* user = */ sectionKey.first,
|
||||
() -> duplicateIconRequests.get(0).launcherActivityInfo,
|
||||
mLauncherActivityInfoCachingLogic,
|
||||
c,
|
||||
/* usePackageIcon= */ false,
|
||||
/* useLowResIcons = */ sectionKey.second);
|
||||
|
||||
for (IconRequestInfo<T> iconRequest : duplicateIconRequests) {
|
||||
applyCacheEntry(entry, iconRequest.itemInfo);
|
||||
for (IconRequestInfo<T> iconRequest : duplicateIconRequests) {
|
||||
applyCacheEntry(entry, iconRequest.itemInfo);
|
||||
}
|
||||
} else {
|
||||
Log.e(TAG, "Found entry in icon database but no main activity "
|
||||
+ "entry for cn: " + cn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user