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

Commit 0ce3bbcd authored by Kevin Lim's avatar Kevin Lim
Browse files

[IconCache] Skip caching package icon if default icon is retreived.

Bug: b/327705448
Flag: NONE bug fix
Test: IconCacheTest
Change-Id: I8f79e78a12212255f3a82e0f6f05430217408a97
parent 57d818d6
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -589,8 +589,12 @@ public abstract class BaseIconCache {
                    BaseIconFactory li = getIconFactory();
                    // Load the full res icon for the application, but if useLowResIcon is set, then
                    // only keep the low resolution icon instead of the larger full-sized icon
                    BitmapInfo iconInfo = li.createBadgedIconBitmap(
                            appInfo.loadIcon(mPackageManager),
                    Drawable appIcon = appInfo.loadIcon(mPackageManager);
                    if (mPackageManager.isDefaultApplicationIcon(appIcon)) {
                        throw new NameNotFoundException(
                                "AppIcon from package manager was default icon.");
                    }
                    BitmapInfo iconInfo = li.createBadgedIconBitmap(appIcon,
                            new IconOptions().setUser(user).setInstantApp(isInstantApp(appInfo)));
                    li.close();