Merge "Update UI to add new audio app ops."

This commit is contained in:
Dianne Hackborn
2013-05-06 23:33:20 +00:00
committed by Android (Google) Code Review
4 changed files with 45 additions and 14 deletions

View File

@@ -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" />

View File

@@ -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 -->

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
};