diff options
author | Christopher Tate <ctate@google.com> | 2013-11-08 12:45:38 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-11-08 12:45:38 -0800 |
commit | 05e3f55f17e36b415a23095dbeaa1d04716aed5a (patch) | |
tree | 71169e10df5bb6c3bb082012b2eecf2708fa3bb9 /services | |
parent | d084cc44eb59407c851399d548256c145eb45342 (diff) | |
parent | 1d8f592a752c30534a6e03889f1ba42b232770ef (diff) | |
download | frameworks_base-05e3f55f17e36b415a23095dbeaa1d04716aed5a.zip frameworks_base-05e3f55f17e36b415a23095dbeaa1d04716aed5a.tar.gz frameworks_base-05e3f55f17e36b415a23095dbeaa1d04716aed5a.tar.bz2 |
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 '1d8f592a752c30534a6e03889f1ba42b232770ef':
System package permission decls take precedence over 3rd party apps'
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/pm/PackageManagerService.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/services/java/com/android/server/pm/PackageManagerService.java b/services/java/com/android/server/pm/PackageManagerService.java index b8324ee..d54198a 100644 --- a/services/java/com/android/server/pm/PackageManagerService.java +++ b/services/java/com/android/server/pm/PackageManagerService.java @@ -4378,6 +4378,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); |