Provide a public API for TelephonyManager.getForbiddenPlmns()
Bug: 33296073
Test: none
Change-Id: I4f1bce663669c18098755c386456e6e9687a3cfb
diff --git a/api/current.txt b/api/current.txt
index 5555d1f..51bbd84 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -37955,6 +37955,7 @@
method public java.lang.String getDeviceId();
method public java.lang.String getDeviceId(int);
method public java.lang.String getDeviceSoftwareVersion();
+ method public java.lang.String[] getForbiddenPlmns();
method public java.lang.String getGroupIdLevel1();
method public java.lang.String getIccAuthentication(int, int, java.lang.String);
method public java.lang.String getLine1Number();
diff --git a/api/system-current.txt b/api/system-current.txt
index 701c86f..715e9c4 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -41164,6 +41164,7 @@
method public java.lang.String getDeviceId();
method public java.lang.String getDeviceId(int);
method public java.lang.String getDeviceSoftwareVersion();
+ method public java.lang.String[] getForbiddenPlmns();
method public java.lang.String getGroupIdLevel1();
method public java.lang.String getIccAuthentication(int, int, java.lang.String);
method public java.lang.String getImei();
diff --git a/api/test-current.txt b/api/test-current.txt
index 1979667..ac9263a 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -38037,6 +38037,7 @@
method public java.lang.String getDeviceId();
method public java.lang.String getDeviceId(int);
method public java.lang.String getDeviceSoftwareVersion();
+ method public java.lang.String[] getForbiddenPlmns();
method public java.lang.String getGroupIdLevel1();
method public java.lang.String getIccAuthentication(int, int, java.lang.String);
method public java.lang.String getLine1Number();
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index c457b7d..94bbcf5 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -4174,6 +4174,19 @@
}
/**
+ * Returns an array of Forbidden PLMNs from the USIM App
+ * Returns null if the query fails.
+ *
+ *
+ * <p>Requires that the caller has READ_PRIVILEGED_PHONE_STATE
+ *
+ * @return an array of forbidden PLMNs or null if not available
+ */
+ public String[] getForbiddenPlmns() {
+ return getForbiddenPlmns(getSubId(), APPTYPE_USIM);
+ }
+
+ /**
* Returns an array of Forbidden PLMNs from the specified SIM App
* Returns null if the query fails.
*
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index 0515168..d21efc6 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -1218,7 +1218,6 @@
*/
void setPolicyDataEnabled(boolean enabled, int subId);
-
/**
* Get Client request stats which will contain statistical information
* on each request made by client.
@@ -1236,6 +1235,7 @@
* */
void setSimPowerStateForSlot(int slotId, boolean powerUp);
+ /**
* Returns a list of Forbidden PLMNs from the specified SIM App
* Returns null if the query fails.
*