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

@@ -35,9 +35,12 @@ public class AppStateUsageBridge extends AppStateAppOpsBridge {
private static final String PM_USAGE_STATS = Manifest.permission.PACKAGE_USAGE_STATS;
private static final int APP_OPS_OP_CODE = AppOpsManager.OP_GET_USAGE_STATS;
private static final String[] PM_PERMISSION = {
PM_USAGE_STATS
};
public AppStateUsageBridge(Context context, ApplicationsState appState, Callback callback) {
super(context, appState, callback, APP_OPS_OP_CODE, PM_USAGE_STATS);
super(context, appState, callback, APP_OPS_OP_CODE, PM_PERMISSION);
}
@Override