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

Commit fd706246 authored by Christopher Tate's avatar Christopher Tate Committed by Android Git Automerger
Browse files

am 562fddce: am 05e3f55f: am 1d8f592a: am ef12b1d4: am ea198841: am ef4694cb:...

am 562fddce: am 05e3f55f: am 1d8f592a: am ef12b1d4: am ea198841: am ef4694cb: am ae229d99: am 43253333: am 50cbfd55: System package permission decls take precedence over 3rd party apps\'

* commit '562fddce':
  System package permission decls take precedence over 3rd party apps'
parents 0fed1239 562fddce
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -4757,6 +4757,18 @@ public class PackageManagerService extends IPackageManager.Stub {
                        permissionMap.put(p.info.name, bp);
                    }
                    if (bp.perm == null) {
                        if (bp.sourcePackage != null
                                && !bp.sourcePackage.equals(p.info.packageName)) {
                            // If this is a permission that was formerly defined by a non-system
                            // app, but is now defined by a system app (following an upgrade),
                            // discard the previous declaration and consider the system's to be
                            // canonical.
                            if (isSystemApp(p.owner)) {
                                Slog.i(TAG, "New decl " + p.owner + " of permission  "
                                        + p.info.name + " is system");
                                bp.sourcePackage = null;
                            }
                        }
                        if (bp.sourcePackage == null
                                || bp.sourcePackage.equals(p.info.packageName)) {
                            BasePermission tree = findPermissionTreeLP(p.info.name);