summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--telephony/java/android/provider/Telephony.java7
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java22
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl12
3 files changed, 41 insertions, 0 deletions
diff --git a/telephony/java/android/provider/Telephony.java b/telephony/java/android/provider/Telephony.java
index d7024cfb7e2f..61d60e3e186f 100644
--- a/telephony/java/android/provider/Telephony.java
+++ b/telephony/java/android/provider/Telephony.java
@@ -2756,6 +2756,13 @@ public final class Telephony {
"content://telephony/carriers/enforce_managed");
/**
+ * The {@code content://} style URL to be called from Telephony to query current APNs.
+ * @hide
+ */
+ public static final Uri SIM_APN_LIST = Uri.parse(
+ "content://telephony/carriers/sim_apn_list");
+
+ /**
* The column name for ENFORCE_MANAGED_URI, indicates whether DPC-owned APNs are enforced.
* @hide
*/
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 1091b5839fe4..8414ed3b89db 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -8292,6 +8292,28 @@ public class TelephonyManager {
}
/**
+ * Returns MNO carrier id of the current subscription’s MCCMNC.
+ * <p>MNO carrier id can be solely identified by subscription mccmnc. This is mainly used
+ * for MNO fallback when exact carrier id {@link #getSimCarrierId()}
+ * configurations are not found.
+ *
+ * @return MNO carrier id of the current subscription. Return the value same as carrier id
+ * {@link #getSimCarrierId()}, if MNO carrier id cannot be identified.
+ * @hide
+ */
+ public int getSimMNOCarrierId() {
+ try {
+ ITelephony service = getITelephony();
+ if (service != null) {
+ return service.getSubscriptionMNOCarrierId(getSubId());
+ }
+ } catch (RemoteException ex) {
+ // This could happen if binder process crashes.
+ }
+ return UNKNOWN_CARRIER_ID;
+ }
+
+ /**
* Return the application ID for the uicc application type like {@link #APPTYPE_CSIM}.
* All uicc applications are uniquely identified by application ID. See ETSI 102.221 and 101.220
* <p>Requires Permission:
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index b20b164e46d5..682141f6b578 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -1311,6 +1311,18 @@ interface ITelephony {
String getSubscriptionCarrierName(int subId);
/**
+ * Returns MNO carrier id of the current subscription’s MCCMNC.
+ * <p>MNO carrier id can be solely identified by subscription mccmnc. This is mainly used
+ * for MNO fallback when exact carrier id {@link #getSimCarrierId()}
+ * configurations are not found.
+ *
+ * @return MNO carrier id of the current subscription. Return the value same as carrier id
+ * {@link #getSimCarrierId()}, if MNO carrier id cannot be identified.
+ * @hide
+ */
+ int getSubscriptionMNOCarrierId(int subId);
+
+ /**
* Action set from carrier signalling broadcast receivers to enable/disable metered apns
* Permissions android.Manifest.permission.MODIFY_PHONE_STATE is required
* @param subId the subscription ID that this action applies to.