summaryrefslogtreecommitdiffstats
path: root/services/core
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2015-10-27 15:22:39 -0700
committerSvetoslav <svetoslavganov@google.com>2015-10-27 18:12:06 -0700
commit01af6a42a6a008d4b208a92510537791b261168c (patch)
tree707ff399b082b756d1f838099617cf4492dd39eb /services/core
parente39def480fd2d1bcc3a89751dd492d4634c38194 (diff)
downloadframeworks_base-01af6a42a6a008d4b208a92510537791b261168c.zip
frameworks_base-01af6a42a6a008d4b208a92510537791b261168c.tar.gz
frameworks_base-01af6a42a6a008d4b208a92510537791b261168c.tar.bz2
Make SYSTEM_ALERT_WINDOW development permission
bug:25329324 Change-Id: I0086464846bab9424764dd0d726692d96a0f1207
Diffstat (limited to 'services/core')
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerService.java18
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 8e6e688..23f45e8 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);