Add support for querying Forbidden PLMNs
Bug: 32277497 Test: Verified via public API for: missing SIM and working SIM Change-Id: Ib7838a4be81853ef336e4f3d527c483b49cd2167
This commit is contained in:
@@ -4173,6 +4173,32 @@ public class TelephonyManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of Forbidden PLMNs from the specified SIM App
|
||||
* Returns null if the query fails.
|
||||
*
|
||||
*
|
||||
* <p>Requires that the calling app has READ_PRIVILEGED_PHONE_STATE
|
||||
*
|
||||
* @param subId subscription ID used for authentication
|
||||
* @param appType the icc application type, like {@link #APPTYPE_USIM}
|
||||
* @return fplmns an array of forbidden PLMNs
|
||||
* @hide
|
||||
*/
|
||||
public String[] getForbiddenPlmns(int subId, int appType) {
|
||||
try {
|
||||
ITelephony telephony = getITelephony();
|
||||
if (telephony == null)
|
||||
return null;
|
||||
return telephony.getForbiddenPlmns(subId, appType);
|
||||
} catch (RemoteException ex) {
|
||||
return null;
|
||||
} catch (NullPointerException ex) {
|
||||
// This could happen before phone starts
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get P-CSCF address from PCO after data connection is established or modified.
|
||||
* @param apnType the apnType, "ims" for IMS APN, "emergency" for EMERGENCY APN
|
||||
|
||||
@@ -1235,4 +1235,15 @@ interface ITelephony {
|
||||
* @hide
|
||||
* */
|
||||
void setSimPowerStateForSlot(int slotId, boolean powerUp);
|
||||
|
||||
* Returns a list of Forbidden PLMNs from the specified SIM App
|
||||
* Returns null if the query fails.
|
||||
*
|
||||
*
|
||||
* <p>Requires that the calling app has READ_PRIVILEGED_PHONE_STATE
|
||||
*
|
||||
* @param subId subscription ID used for authentication
|
||||
* @param appType the icc application type, like {@link #APPTYPE_USIM}
|
||||
*/
|
||||
String[] getForbiddenPlmns(int subId, int appType);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user