Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b313ac7a authored by Rohit Goyal's avatar Rohit Goyal
Browse files

Bugfix: Add null safety when accessing icon database for main activities for...

Bugfix: Add null safety when accessing icon database for main activities for LoaderTask `loadAllApps`.

Test: verified bugfixes locally.
Bug: 329145005
Flag: NA
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3a6318ab5e2dee0b85c3270467477854301497a1)
Merged-In: I9f3145390d0596e55229d7dda08a4a3034d75f31
Change-Id: I9f3145390d0596e55229d7dda08a4a3034d75f31
parent 1c8bd716
Loading
Loading
Loading
Loading
+16 −11
Original line number Diff line number Diff line
@@ -469,6 +469,7 @@ public class IconCache extends BaseIconCache {
                        duplicateIconRequestsMap.get(cn);

                if (cn != null) {
                    if (duplicateIconRequests != null) {
                        CacheEntry entry = cacheLocked(
                                cn,
                                /* user = */ sectionKey.first,
@@ -481,6 +482,10 @@ public class IconCache extends BaseIconCache {
                        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);
                    }
                }
            }
        } catch (SQLiteException e) {