diff options
author | Svetoslav Ganov <svetoslavganov@google.com> | 2015-10-29 01:10:46 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-10-29 01:10:46 +0000 |
commit | 2658cb002abae9341c9a82bfeaed764ba5bf97c8 (patch) | |
tree | 41e4e6ced6e2948becaf015ec6055247c62f6b84 /services | |
parent | c7522c0b1c3b8f445ddc1b75f0600363ecbd27a6 (diff) | |
parent | 01af6a42a6a008d4b208a92510537791b261168c (diff) | |
download | frameworks_base-2658cb002abae9341c9a82bfeaed764ba5bf97c8.zip frameworks_base-2658cb002abae9341c9a82bfeaed764ba5bf97c8.tar.gz frameworks_base-2658cb002abae9341c9a82bfeaed764ba5bf97c8.tar.bz2 |
Merge "Make SYSTEM_ALERT_WINDOW development permission" into mnc-dr-dev
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/pm/PackageManagerService.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index 61e5acc..5977a1b 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -1713,13 +1713,14 @@ public class PackageManagerService extends IPackageManager.Stub { return; } - PermissionsState permissionsState = sb.getPermissionsState(); - - for (String permission : pkg.requestedPermissions) { - BasePermission bp = mSettings.mPermissions.get(permission); - if (bp != null && bp.isRuntime() && (grantedPermissions == null - || ArrayUtils.contains(grantedPermissions, permission))) { - permissionsState.grantRuntimePermission(bp, userId); + synchronized (mPackages) { + for (String permission : pkg.requestedPermissions) { + BasePermission bp = mSettings.mPermissions.get(permission); + if (bp != null && (bp.isRuntime() || bp.isDevelopment()) + && (grantedPermissions == null + || ArrayUtils.contains(grantedPermissions, permission))) { + grantRuntimePermission(pkg.packageName, permission, userId); + } } } } @@ -3519,7 +3520,8 @@ public class PackageManagerService extends IPackageManager.Stub { killUid(appId, userId, KILL_APP_REASON_GIDS_CHANGED); } }); - } break; + } + break; } mOnPermissionChangeListeners.onPermissionsChanged(uid); |