Bug: 21588539 Move CHANGE_NETWORK_STATE to be in SYSTEM_SETTINGS

Change the implementation of AppStateAppOpsBridge to handle multiple
requested permissions in one operation due to the merging of
CHANGE_NETWORK_STATE permission with WRITE_SETTINGS.

This change will affect the packages that will be listed under the
"Write system settings" option in Settings->Apps->[Gear/Cog].

Change-Id: I7d2304d2846b6f505a7b1c3fcf53e7a9bd184ed5
This commit is contained in:
Billy Lau
2015-08-01 18:12:33 +01:00
parent 1adca55ffe
commit 3d9c7fc998
4 changed files with 41 additions and 11 deletions

View File

@@ -34,9 +34,12 @@ public class AppStateOverlayBridge extends AppStateAppOpsBridge {
private static final String TAG = "AppStateOverlayBridge";
private static final int APP_OPS_OP_CODE = AppOpsManager.OP_SYSTEM_ALERT_WINDOW;
private static final String PM_SYSTEM_ALERT_WINDOW = Manifest.permission.SYSTEM_ALERT_WINDOW;
private static final String[] PM_PERMISSION = {
PM_SYSTEM_ALERT_WINDOW
};
public AppStateOverlayBridge(Context context, ApplicationsState appState, Callback callback) {
super(context, appState, callback, APP_OPS_OP_CODE, PM_SYSTEM_ALERT_WINDOW);
super(context, appState, callback, APP_OPS_OP_CODE, PM_PERMISSION);
}
@Override