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

Commit e34a75df authored by Patrick Baumann's avatar Patrick Baumann
Browse files

Avoid unnecessary badging

This change attempts to fetch the unbadged icon from ApplicationInfo for
a given PackageInfo before falling back to the default (badged) icon.

Test: manual; verify that TestDPC is only badged once when viewing device admins
Fixes: 112254944
Change-Id: I55026af543ff71ac0d947159bc6aeb3b33f31271
parent 3eb46249
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2764,6 +2764,9 @@ public class ApplicationPackageManager extends PackageManager {
        if (itemInfo.packageName != null) {
            dr = getDrawable(itemInfo.packageName, itemInfo.icon, appInfo);
        }
        if (dr == null && itemInfo != appInfo) {
            dr = loadUnbadgedItemIcon(appInfo, appInfo);
        }
        if (dr == null) {
            dr = itemInfo.loadDefaultIcon(this);
        }