Update UI to add new audio app ops.

Change-Id: I307d25bdd6bee2e7d7a9df32849ef206abaf2318
This commit is contained in:
Dianne Hackborn
2013-04-30 15:06:22 -07:00
parent 68a958619d
commit 6e91babeda
4 changed files with 45 additions and 14 deletions

View File

@@ -149,29 +149,51 @@ public class AppOpsState {
true }
);
public static final OpsTemplate DEVICE_TEMPLATE = new OpsTemplate(
public static final OpsTemplate MEDIA_TEMPLATE = new OpsTemplate(
new int[] { AppOpsManager.OP_VIBRATE,
AppOpsManager.OP_POST_NOTIFICATION,
AppOpsManager.OP_CAMERA,
AppOpsManager.OP_RECORD_AUDIO,
AppOpsManager.OP_PLAY_AUDIO,
AppOpsManager.OP_TAKE_MEDIA_BUTTONS,
AppOpsManager.OP_TAKE_AUDIO_FOCUS,
AppOpsManager.OP_AUDIO_MASTER_VOLUME,
AppOpsManager.OP_AUDIO_VOICE_VOLUME,
AppOpsManager.OP_AUDIO_RING_VOLUME,
AppOpsManager.OP_AUDIO_MEDIA_VOLUME,
AppOpsManager.OP_AUDIO_ALARM_VOLUME,
AppOpsManager.OP_AUDIO_NOTIFICATION_VOLUME,
AppOpsManager.OP_AUDIO_BLUETOOTH_VOLUME, },
new boolean[] { false,
true,
true,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false }
);
public static final OpsTemplate DEVICE_TEMPLATE = new OpsTemplate(
new int[] { AppOpsManager.OP_POST_NOTIFICATION,
AppOpsManager.OP_ACCESS_NOTIFICATIONS,
AppOpsManager.OP_CALL_PHONE,
AppOpsManager.OP_WRITE_SETTINGS,
AppOpsManager.OP_SYSTEM_ALERT_WINDOW,
AppOpsManager.OP_CAMERA,
AppOpsManager.OP_RECORD_AUDIO,
AppOpsManager.OP_PLAY_AUDIO },
AppOpsManager.OP_SYSTEM_ALERT_WINDOW },
new boolean[] { false,
false,
true,
true,
true,
true,
true,
true,
true }
true, }
);
public static final OpsTemplate[] ALL_TEMPLATES = new OpsTemplate[] {
LOCATION_TEMPLATE, PERSONAL_TEMPLATE, MESSAGING_TEMPLATE, DEVICE_TEMPLATE
LOCATION_TEMPLATE, PERSONAL_TEMPLATE, MESSAGING_TEMPLATE,
MEDIA_TEMPLATE, DEVICE_TEMPLATE
};
/**

View File

@@ -43,6 +43,7 @@ public class AppOpsSummary extends Fragment {
AppOpsState.LOCATION_TEMPLATE,
AppOpsState.PERSONAL_TEMPLATE,
AppOpsState.MESSAGING_TEMPLATE,
AppOpsState.MEDIA_TEMPLATE,
AppOpsState.DEVICE_TEMPLATE
};