App ops: add UI for SMS ops.
Change-Id: I595df9a286ba5389f9e309516dc4a8ab34773277
This commit is contained in:
@@ -557,6 +557,7 @@
|
|||||||
<string-array name="app_ops_categories">
|
<string-array name="app_ops_categories">
|
||||||
<item>Location</item>
|
<item>Location</item>
|
||||||
<item>Personal</item>
|
<item>Personal</item>
|
||||||
|
<item>Messaging</item>
|
||||||
<item>Device</item>
|
<item>Device</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
@@ -568,14 +569,23 @@
|
|||||||
<item>vibrate</item>
|
<item>vibrate</item>
|
||||||
<item>read contacts</item>
|
<item>read contacts</item>
|
||||||
<item>write contacts</item>
|
<item>write contacts</item>
|
||||||
<item>read calls</item>
|
<item>read call log</item>
|
||||||
<item>write calls</item>
|
<item>write call log</item>
|
||||||
<item>read calendar</item>
|
<item>read calendar</item>
|
||||||
<item>write calendar</item>
|
<item>write calendar</item>
|
||||||
<item>wi-fi scan</item>
|
<item>wi-fi scan</item>
|
||||||
<item>notification</item>
|
<item>notification</item>
|
||||||
<item>cell scan</item>
|
<item>cell scan</item>
|
||||||
<item>call phone</item>
|
<item>call phone</item>
|
||||||
|
<item>read SMS</item>
|
||||||
|
<item>write SMS</item>
|
||||||
|
<item>receive SMS</item>
|
||||||
|
<item>receive emergency SMS</item>
|
||||||
|
<item>receive MMS</item>
|
||||||
|
<item>receive WAP push</item>
|
||||||
|
<item>send SMS</item>
|
||||||
|
<item>read ICC SMS</item>
|
||||||
|
<item>write ICC SMS</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- User display names for app ops codes -->
|
<!-- User display names for app ops codes -->
|
||||||
@@ -586,14 +596,23 @@
|
|||||||
<item>Vibrate</item>
|
<item>Vibrate</item>
|
||||||
<item>Read contacts</item>
|
<item>Read contacts</item>
|
||||||
<item>Write contacts</item>
|
<item>Write contacts</item>
|
||||||
<item>Read calls</item>
|
<item>Read call log</item>
|
||||||
<item>Write calls</item>
|
<item>Write call log</item>
|
||||||
<item>Read calendar</item>
|
<item>Read calendar</item>
|
||||||
<item>Write calendar</item>
|
<item>Write calendar</item>
|
||||||
<item>Location</item>
|
<item>Location</item>
|
||||||
<item>Post notification</item>
|
<item>Post notification</item>
|
||||||
<item>Location</item>
|
<item>Location</item>
|
||||||
<item>Call phone</item>
|
<item>Call phone</item>
|
||||||
|
<item>Receive SMS/MMS</item>
|
||||||
|
<item>Send SMS/MMS</item>
|
||||||
|
<item>Receive SMS/MMS</item>
|
||||||
|
<item>Receive SMS/MMS</item>
|
||||||
|
<item>Receive SMS/MMS</item>
|
||||||
|
<item>Receive SMS/MMS</item>
|
||||||
|
<item>Send SMS/MMS</item>
|
||||||
|
<item>Receive SMS/MMS</item>
|
||||||
|
<item>Send SMS/MMS</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- Titles for the list of long press timeout options. -->
|
<!-- Titles for the list of long press timeout options. -->
|
||||||
|
@@ -124,6 +124,27 @@ public class AppOpsState {
|
|||||||
true }
|
true }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
public static final OpsTemplate MESSAGING_TEMPLATE = new OpsTemplate(
|
||||||
|
new int[] { AppOpsManager.OP_READ_SMS,
|
||||||
|
AppOpsManager.OP_RECEIVE_SMS,
|
||||||
|
AppOpsManager.OP_RECEIVE_EMERGECY_SMS,
|
||||||
|
AppOpsManager.OP_RECEIVE_MMS,
|
||||||
|
AppOpsManager.OP_RECEIVE_WAP_PUSH,
|
||||||
|
AppOpsManager.OP_WRITE_SMS,
|
||||||
|
AppOpsManager.OP_SEND_SMS,
|
||||||
|
AppOpsManager.OP_READ_ICC_SMS,
|
||||||
|
AppOpsManager.OP_WRITE_ICC_SMS },
|
||||||
|
new boolean[] { true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true }
|
||||||
|
);
|
||||||
|
|
||||||
public static final OpsTemplate DEVICE_TEMPLATE = new OpsTemplate(
|
public static final OpsTemplate DEVICE_TEMPLATE = new OpsTemplate(
|
||||||
new int[] { AppOpsManager.OP_VIBRATE,
|
new int[] { AppOpsManager.OP_VIBRATE,
|
||||||
AppOpsManager.OP_POST_NOTIFICATION,
|
AppOpsManager.OP_POST_NOTIFICATION,
|
||||||
@@ -134,7 +155,7 @@ public class AppOpsState {
|
|||||||
);
|
);
|
||||||
|
|
||||||
public static final OpsTemplate[] ALL_TEMPLATES = new OpsTemplate[] {
|
public static final OpsTemplate[] ALL_TEMPLATES = new OpsTemplate[] {
|
||||||
LOCATION_TEMPLATE, PERSONAL_TEMPLATE, DEVICE_TEMPLATE
|
LOCATION_TEMPLATE, PERSONAL_TEMPLATE, MESSAGING_TEMPLATE, DEVICE_TEMPLATE
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -42,6 +42,7 @@ public class AppOpsSummary extends Fragment {
|
|||||||
static AppOpsState.OpsTemplate[] sPageTemplates = new AppOpsState.OpsTemplate[] {
|
static AppOpsState.OpsTemplate[] sPageTemplates = new AppOpsState.OpsTemplate[] {
|
||||||
AppOpsState.LOCATION_TEMPLATE,
|
AppOpsState.LOCATION_TEMPLATE,
|
||||||
AppOpsState.PERSONAL_TEMPLATE,
|
AppOpsState.PERSONAL_TEMPLATE,
|
||||||
|
AppOpsState.MESSAGING_TEMPLATE,
|
||||||
AppOpsState.DEVICE_TEMPLATE
|
AppOpsState.DEVICE_TEMPLATE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user