summaryrefslogtreecommitdiffstats
path: root/telephony/java
diff options
context:
space:
mode:
authorShishir Agrawal <shishir@google.com>2014-11-26 11:29:54 -0800
committerShishir Agrawal <shishir@google.com>2014-12-09 10:37:16 -0800
commit5fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8 (patch)
treee6fbd72d94691be03016223d700c11e28565d105 /telephony/java
parent6ef76c60df9e68950721f92a14c77a3ecd13607c (diff)
downloadframeworks_base-5fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8.zip
frameworks_base-5fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8.tar.gz
frameworks_base-5fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8.tar.bz2
Adding a new hidden carrier API to mark GSM/CDMA networks as roaming/non-roaming.
The calls allow us to specify MCC/MNCs (for GSM) and SIDs for CDMA that should not be considered as roaming for the current ICCID. Bug: 13288143 Change-Id: Iae97b02f3eb9954fedf1b005c9ecd2aa09138505
Diffstat (limited to 'telephony/java')
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java34
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl21
2 files changed, 55 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 73e3213..d0ddeac 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -43,6 +43,7 @@ import java.io.FileInputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
+import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -3183,6 +3184,39 @@ public class TelephonyManager {
}
/**
+ * Override the roaming preference for the current ICCID.
+ *
+ * Using this call, the carrier app (see #hasCarrierPrivileges) can override
+ * the platform's notion of a network operator being considered roaming or not.
+ * The change only affects the ICCID that was active when this call was made.
+ *
+ * If null is passed as any of the input, the corresponding value is deleted.
+ *
+ * <p>Requires that the caller have carrier privilege. See #hasCarrierPrivileges.
+ *
+ * @param gsmRoamingList - List of MCCMNCs to be considered roaming for 3GPP RATs.
+ * @param gsmNonRoamingList - List of MCCMNCs to be considered not roaming for 3GPP RATs.
+ * @param cdmaRoamingList - List of SIDs to be considered roaming for 3GPP2 RATs.
+ * @param cdmaNonRoamingList - List of SIDs to be considered not roaming for 3GPP2 RATs.
+ * @return true if the operation was executed correctly.
+ *
+ * @hide
+ */
+ public boolean setRoamingOverride(List<String> gsmRoamingList,
+ List<String> gsmNonRoamingList, List<String> cdmaRoamingList,
+ List<String> cdmaNonRoamingList) {
+ try {
+ return getITelephony().setRoamingOverride(gsmRoamingList, gsmNonRoamingList,
+ cdmaRoamingList, cdmaNonRoamingList);
+ } catch (RemoteException ex) {
+ Rlog.e(TAG, "setRoamingOverride RemoteException", ex);
+ } catch (NullPointerException ex) {
+ Rlog.e(TAG, "setRoamingOverride NPE", ex);
+ }
+ return false;
+ }
+
+ /**
* Expose the rest of ITelephony to @SystemApi
*/
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index 4affad8..ca14ca4 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -792,6 +792,27 @@ interface ITelephony {
boolean setOperatorBrandOverride(String brand);
/**
+ * Override the roaming indicator for the current ICCID.
+ *
+ * Using this call, the carrier app (see #hasCarrierPrivileges) can override
+ * the platform's notion of a network operator being considered roaming or not.
+ * The change only affects the ICCID that was active when this call was made.
+ *
+ * If null is passed as any of the input, the corresponding value is deleted.
+ *
+ * <p>Requires that the caller have carrier privilege. See #hasCarrierPrivileges.
+ *
+ * @param gsmRoamingList - List of MCCMNCs to be considered roaming for 3GPP RATs.
+ * @param gsmNonRoamingList - List of MCCMNCs to be considered not roaming for 3GPP RATs.
+ * @param cdmaRoamingList - List of SIDs to be considered roaming for 3GPP2 RATs.
+ * @param cdmaNonRoamingList - List of SIDs to be considered not roaming for 3GPP2 RATs.
+ * @return true if the operation was executed correctly.
+ */
+ boolean setRoamingOverride(in List<String> gsmRoamingList,
+ in List<String> gsmNonRoamingList, in List<String> cdmaRoamingList,
+ in List<String> cdmaNonRoamingList);
+
+ /**
* Returns the result and response from RIL for oem request
*
* @param oemReq the data is sent to ril.