Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Make SYSTEM_ALERT_WINDOW development permission
Browse files Browse the repository at this point in the history
bug:25329324

Change-Id: I0086464846bab9424764dd0d726692d96a0f1207
  • Loading branch information
sganov committed Oct 28, 2015
1 parent e39def4 commit 01af6a4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion core/res/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1461,7 +1461,7 @@
<permission android:name="android.permission.SYSTEM_ALERT_WINDOW"
android:label="@string/permlab_systemAlertWindow"
android:description="@string/permdesc_systemAlertWindow"
android:protectionLevel="signature|preinstalled|appop|pre23" />
android:protectionLevel="signature|preinstalled|appop|pre23|development" />

<!-- ================================== -->
<!-- Permissions affecting the system wallpaper -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1713,13 +1713,14 @@ private void grantRequestedRuntimePermissionsForUser(PackageParser.Package pkg,
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);
}
}
}
}
Expand Down Expand Up @@ -3519,7 +3520,8 @@ public void run() {
killUid(appId, userId, KILL_APP_REASON_GIDS_CHANGED);
}
});
} break;
}
break;
}

mOnPermissionChangeListeners.onPermissionsChanged(uid);
Expand Down

0 comments on commit 01af6a4

Please sign in to comment.