diff options
author | Svet Ganov <svetoslavganov@google.com> | 2015-11-02 09:32:01 -0800 |
---|---|---|
committer | The Android Automerger <android-build@google.com> | 2015-11-02 13:21:08 -0800 |
commit | 7ed23d24370b213abd3bdf258349627ea45d64f5 (patch) | |
tree | 84bcdf473708288371727db35d473281989f3f9c /services | |
parent | a8d422531759f786e53b5bf1dbc0eb942545e514 (diff) | |
download | frameworks_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.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); } } |