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

Commit 15917c80 authored by Andy Mast's avatar Andy Mast Committed by Gerrit Code Review
Browse files

Merge "Themes: Map themed icon to app after upgrade" into cm-11.0

parents fd55c3e3 88a5574d
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -5059,6 +5059,13 @@ public class PackageManagerService extends IPackageManager.Stub {
            }
            // Add the new setting to mSettings
            mSettings.insertPackageSettingLPw(pkgSetting, pkg);
            // Themes: handle case where app was installed after icon mapping applied
            if (mIconPackHelper != null) {
                int id = mIconPackHelper.getResourceIdForApp(pkg.packageName);
                pkg.applicationInfo.themedIcon = id;
            }
            // Add the new setting to mPackages
            mPackages.put(pkg.applicationInfo.packageName, pkg);
            // Make sure we don't accidentally delete its data.
@@ -5212,6 +5219,13 @@ public class PackageManagerService extends IPackageManager.Stub {
                PackageParser.Activity a = pkg.activities.get(i);
                a.info.processName = fixProcessName(pkg.applicationInfo.processName,
                        a.info.processName, pkg.applicationInfo.uid);
                // Themes: handle case where app was installed after icon mapping applied
                if (mIconPackHelper != null) {
                    a.info.themedIcon = mIconPackHelper
                            .getResourceIdForActivityIcon(a.info);
                }
                mActivities.addActivity(a, "activity");
                if ((parseFlags&PackageParser.PARSE_CHATTY) != 0) {
                    if (r == null) {
@@ -12368,6 +12382,7 @@ public class PackageManagerService extends IPackageManager.Stub {
    }
    private void clearIconMapping() {
        mIconPackHelper = null;
        for (Activity activity : mActivities.mActivities.values()) {
            activity.info.themedIcon = 0;
        }