diff options
author | Svet Ganov <svetoslavganov@google.com> | 2015-11-02 09:32:01 -0800 |
---|---|---|
committer | Svetoslav Ganov <svetoslavganov@google.com> | 2015-11-02 19:45:00 +0000 |
commit | 4f7883ce61aa8781f8781104fbee18d8ba1feb81 (patch) | |
tree | e0b4fdca4ea49d1f3989fd07c2a152f956a1388b /services | |
parent | 3b1c6e03f67ba8e4a4f4a98e996c7ceabf36affa (diff) | |
download | frameworks_base-4f7883ce61aa8781f8781104fbee18d8ba1feb81.zip frameworks_base-4f7883ce61aa8781f8781104fbee18d8ba1feb81.tar.gz frameworks_base-4f7883ce61aa8781f8781104fbee18d8ba1feb81.tar.bz2 |
Don't try overriding system fixed permissions on install
bug:25397466
Change-Id: Ie92ec000a94b757178ddfdd9384407535f4af9db
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/pm/PackageManagerService.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index cf15334..4e49312 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -1718,7 +1718,9 @@ public class PackageManagerService extends IPackageManager.Stub { BasePermission bp = mSettings.mPermissions.get(permission); if (bp != null && (bp.isRuntime() || bp.isDevelopment()) && (grantedPermissions == null - || ArrayUtils.contains(grantedPermissions, permission))) { + || ArrayUtils.contains(grantedPermissions, permission)) + && (getPermissionFlags(permission, pkg.packageName, userId) + & PackageManager.FLAG_PERMISSION_SYSTEM_FIXED) == 0) { grantRuntimePermission(pkg.packageName, permission, userId); } } |