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

Commit 21bd9b82 authored by Todd Kennedy's avatar Todd Kennedy
Browse files

Allow permission group updates

When a package in updated, it may redefine a permisson group [specify a
new icon, text, etc...]. Udate our internal structures to the new package.

Bug: 30347537
Change-Id: I9fbaf7c68a4de658489cfd1c728473032dded98b
parent 67abc837
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -8650,7 +8650,9 @@ public class PackageManagerService extends IPackageManager.Stub {
            for (i=0; i<N; i++) {
                PackageParser.PermissionGroup pg = pkg.permissionGroups.get(i);
                PackageParser.PermissionGroup cur = mPermissionGroups.get(pg.info.name);
                if (cur == null) {
                final String curPackageName = cur == null ? null : cur.info.packageName;
                final boolean isPackageUpdate = pg.info.packageName.equals(curPackageName);
                if (cur == null || isPackageUpdate) {
                    mPermissionGroups.put(pg.info.name, pg);
                    if ((policyFlags&PackageParser.PARSE_CHATTY) != 0) {
                        if (r == null) {
@@ -8658,6 +8660,9 @@ public class PackageManagerService extends IPackageManager.Stub {
                        } else {
                            r.append(' ');
                        }
                        if (isPackageUpdate) {
                            r.append("UPD:");
                        }
                        r.append(pg.info.name);
                    }
                } else {