From 843d5ea5ec965c17de525b3a9f52c8cb9d352c3c Mon Sep 17 00:00:00 2001 From: Evan Charlton Date: Mon, 13 May 2013 10:35:33 -0700 Subject: [PATCH] Add carrier setup app integration Add an intent to invoke a native carrier setup app. This is paired with the INVOKE_CARRIER_SETUP permission, though it is up to the app to enforce that callers hold this permission. Change-Id: I317a40675de7e9587de23c028459be2331a2f8a2 --- core/res/AndroidManifest.xml | 8 ++++++++ core/res/res/values/strings.xml | 5 +++++ .../internal/telephony/TelephonyIntents.java | 17 +++++++++++++++++ 3 files changed, 30 insertions(+) diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index f33625567cd60..b93bbb665496c 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -2208,6 +2208,14 @@ android:description="@string/permdesc_bindNotificationListenerService" android:protectionLevel="signature" /> + + + diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index ae68925be8907..fc9dd06796e42 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -1832,6 +1832,11 @@ Allows the holder to bind to the top-level interface of a notification listener service. Should never be needed for normal apps. + + invoke the carrier-provided configuration app + + Allows the holder to invoke the carrier-provided configuration app. Should never be needed for normal apps. + diff --git a/telephony/java/com/android/internal/telephony/TelephonyIntents.java b/telephony/java/com/android/internal/telephony/TelephonyIntents.java index 3cfd0bf85ebf8..65bdacfd2ef0a 100644 --- a/telephony/java/com/android/internal/telephony/TelephonyIntents.java +++ b/telephony/java/com/android/internal/telephony/TelephonyIntents.java @@ -237,6 +237,23 @@ public class TelephonyIntents { public static final String ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS = "android.intent.action.ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS"; + /** + * Activity Action: Start this activity to invoke the carrier setup app. + * To filter the intent, see {@link #CATEGORY_MCCMNC_PREFIX}. + * + *

Callers of this should hold the android.permission.INVOKE_CARRIER_SETUP + * permission.

+ */ + public static final String ACTION_CARRIER_SETUP = "android.intent.action.ACTION_CARRIER_SETUP"; + + /** + * A prefix for the MCC/MNC filtering used with {@link #ACTION_CARRIER_SETUP}. + * The MCC/MNC will be concatenated (zero-padded to 3 digits each) to create a final + * string of the form: + *
+ * android.intent.category.MCCMNC_310260 + */ + public static final String CATEGORY_MCCMNC_PREFIX = "android.intent.category.MCCMNC_"; /** * Broadcast Action: A "secret code" has been entered in the dialer. Secret codes are