summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorSvet Ganov <svetoslavganov@google.com>2015-11-02 09:32:01 -0800
committerThe Android Automerger <android-build@google.com>2015-11-02 13:21:08 -0800
commit7ed23d24370b213abd3bdf258349627ea45d64f5 (patch)
tree84bcdf473708288371727db35d473281989f3f9c /services
parenta8d422531759f786e53b5bf1dbc0eb942545e514 (diff)
downloadframeworks_base-7ed23d24370b213abd3bdf258349627ea45d64f5.zip
frameworks_base-7ed23d24370b213abd3bdf258349627ea45d64f5.tar.gz
frameworks_base-7ed23d24370b213abd3bdf258349627ea45d64f5.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.java4
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);
}
}