Merge "Adding a new hidden carrier API to mark GSM/CDMA networks as roaming/non-roaming." into lmp-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
951dcdd940
@@ -43,6 +43,7 @@ import java.io.FileInputStream;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
@@ -3182,6 +3183,39 @@ public class TelephonyManager {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
* Expose the rest of ITelephony to @SystemApi
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -791,6 +791,27 @@ interface ITelephony {
|
|||||||
*/
|
*/
|
||||||
boolean setOperatorBrandOverride(String brand);
|
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
|
* Returns the result and response from RIL for oem request
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user