Merge "Update UI to add new audio app ops."
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 1a6aea3..c8c45a7 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -802,10 +802,8 @@
<action android:name="android.intent.action.MAIN" />
<action android:name="android.settings.APP_OPS_SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
- <!-- Not yet ready to expose.
<category android:name="android.intent.category.VOICE_LAUNCH" />
<category android:name="com.android.settings.SHORTCUT" />
- -->
</intent-filter>
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.applications.AppOpsSummary" />
diff --git a/res/values/arrays.xml b/res/values/arrays.xml
index e56ce01..d02ee1f 100644
--- a/res/values/arrays.xml
+++ b/res/values/arrays.xml
@@ -589,6 +589,7 @@
<item>Location</item>
<item>Personal</item>
<item>Messaging</item>
+ <item>Media</item>
<item>Device</item>
</string-array>
@@ -625,6 +626,15 @@
<item>play audio</item>
<item>read clipboard</item>
<item>modify clipboard</item>
+ <item>media buttons</item>
+ <item>audio focus</item>
+ <item>master volume</item>
+ <item>voice volume</item>
+ <item>ring volume</item>
+ <item>media volume</item>
+ <item>alarm volume</item>
+ <item>notification volume</item>
+ <item>bluetooth volume</item>
</string-array>
<!-- User display names for app ops codes -->
diff --git a/src/com/android/settings/applications/AppOpsState.java b/src/com/android/settings/applications/AppOpsState.java
index 6cdbdaf..be1c73f 100644
--- a/src/com/android/settings/applications/AppOpsState.java
+++ b/src/com/android/settings/applications/AppOpsState.java
@@ -149,29 +149,51 @@
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
};
/**
diff --git a/src/com/android/settings/applications/AppOpsSummary.java b/src/com/android/settings/applications/AppOpsSummary.java
index b0d9ad1..4cee8e5 100644
--- a/src/com/android/settings/applications/AppOpsSummary.java
+++ b/src/com/android/settings/applications/AppOpsSummary.java
@@ -43,6 +43,7 @@
AppOpsState.LOCATION_TEMPLATE,
AppOpsState.PERSONAL_TEMPLATE,
AppOpsState.MESSAGING_TEMPLATE,
+ AppOpsState.MEDIA_TEMPLATE,
AppOpsState.DEVICE_TEMPLATE
};