diff options
| author | Christopher Tate <ctate@google.com> | 2013-11-08 12:27:10 -0800 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2013-11-08 12:27:10 -0800 |
| commit | 43253333d24e856a7ffef818fdfaedf3fd60d3b6 (patch) | |
| tree | 4599213a43944009b0bfee1f80bc151aa0c7e431 /services/java/com/android | |
| parent | ba1ae3af76466b94efedf06c4efac365fd7b9300 (diff) | |
| parent | 50cbfd554f0bdf05c701d8baf15c862fbb8a6dc0 (diff) | |
| download | frameworks_base-43253333d24e856a7ffef818fdfaedf3fd60d3b6.zip frameworks_base-43253333d24e856a7ffef818fdfaedf3fd60d3b6.tar.gz frameworks_base-43253333d24e856a7ffef818fdfaedf3fd60d3b6.tar.bz2 | |
am 50cbfd55: System package permission decls take precedence over 3rd party apps\'
* commit '50cbfd554f0bdf05c701d8baf15c862fbb8a6dc0':
System package permission decls take precedence over 3rd party apps'
Diffstat (limited to 'services/java/com/android')
| -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 f914271..cd7599d 100644 --- a/services/java/com/android/server/pm/PackageManagerService.java +++ b/services/java/com/android/server/pm/PackageManagerService.java @@ -4183,6 +4183,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); |
