Merge "Update UI to add new audio app ops."
This commit is contained in:
committed by
Android (Google) Code Review
commit
7a03d980f7
@@ -802,10 +802,8 @@
|
|||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<action android:name="android.settings.APP_OPS_SETTINGS" />
|
<action android:name="android.settings.APP_OPS_SETTINGS" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<!-- Not yet ready to expose.
|
|
||||||
<category android:name="android.intent.category.VOICE_LAUNCH" />
|
<category android:name="android.intent.category.VOICE_LAUNCH" />
|
||||||
<category android:name="com.android.settings.SHORTCUT" />
|
<category android:name="com.android.settings.SHORTCUT" />
|
||||||
-->
|
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
|
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
|
||||||
android:value="com.android.settings.applications.AppOpsSummary" />
|
android:value="com.android.settings.applications.AppOpsSummary" />
|
||||||
|
@@ -589,6 +589,7 @@
|
|||||||
<item>Location</item>
|
<item>Location</item>
|
||||||
<item>Personal</item>
|
<item>Personal</item>
|
||||||
<item>Messaging</item>
|
<item>Messaging</item>
|
||||||
|
<item>Media</item>
|
||||||
<item>Device</item>
|
<item>Device</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
@@ -625,6 +626,15 @@
|
|||||||
<item>play audio</item>
|
<item>play audio</item>
|
||||||
<item>read clipboard</item>
|
<item>read clipboard</item>
|
||||||
<item>modify 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>
|
</string-array>
|
||||||
|
|
||||||
<!-- User display names for app ops codes -->
|
<!-- User display names for app ops codes -->
|
||||||
|
@@ -149,29 +149,51 @@ public class AppOpsState {
|
|||||||
true }
|
true }
|
||||||
);
|
);
|
||||||
|
|
||||||
public static final OpsTemplate DEVICE_TEMPLATE = new OpsTemplate(
|
public static final OpsTemplate MEDIA_TEMPLATE = new OpsTemplate(
|
||||||
new int[] { AppOpsManager.OP_VIBRATE,
|
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_ACCESS_NOTIFICATIONS,
|
||||||
AppOpsManager.OP_CALL_PHONE,
|
AppOpsManager.OP_CALL_PHONE,
|
||||||
AppOpsManager.OP_WRITE_SETTINGS,
|
AppOpsManager.OP_WRITE_SETTINGS,
|
||||||
AppOpsManager.OP_SYSTEM_ALERT_WINDOW,
|
AppOpsManager.OP_SYSTEM_ALERT_WINDOW },
|
||||||
AppOpsManager.OP_CAMERA,
|
|
||||||
AppOpsManager.OP_RECORD_AUDIO,
|
|
||||||
AppOpsManager.OP_PLAY_AUDIO },
|
|
||||||
new boolean[] { false,
|
new boolean[] { false,
|
||||||
false,
|
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
true,
|
true, }
|
||||||
true,
|
|
||||||
true,
|
|
||||||
true }
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public static final OpsTemplate[] ALL_TEMPLATES = new OpsTemplate[] {
|
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
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -43,6 +43,7 @@ public class AppOpsSummary extends Fragment {
|
|||||||
AppOpsState.LOCATION_TEMPLATE,
|
AppOpsState.LOCATION_TEMPLATE,
|
||||||
AppOpsState.PERSONAL_TEMPLATE,
|
AppOpsState.PERSONAL_TEMPLATE,
|
||||||
AppOpsState.MESSAGING_TEMPLATE,
|
AppOpsState.MESSAGING_TEMPLATE,
|
||||||
|
AppOpsState.MEDIA_TEMPLATE,
|
||||||
AppOpsState.DEVICE_TEMPLATE
|
AppOpsState.DEVICE_TEMPLATE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user