summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2019-12-17 00:53:08 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2019-12-17 00:53:08 +0000
commit59b88e0e6ac9ce5aeab84382842f5e508d855731 (patch)
tree9931c38ff1990ef95d65bcb536ffd11472213c0e
parent6a1d13f58e8c12a050d94d516165443dc424a9b3 (diff)
parentabf9e43cb0618a499204bdc9d00341d6174a5c8b (diff)
Merge "Fix for Telephony Manager API javadoc inconsistencies"
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 642030b32fec..53a4ae432fbf 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -6733,7 +6733,8 @@ public class TelephonyManager {
* If the list is longer than the size of EFfplmn, then the file will be written from the
* beginning of the list up to the file size.
*
- * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * <p>Requires Permission: {@link android.Manifest.permission#MODIFY_PHONE_STATE
+ * MODIFY_PHONE_STATE}
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param fplmns a list of PLMNs to be forbidden.
@@ -6747,7 +6748,7 @@ public class TelephonyManager {
public int setForbiddenPlmns(@NonNull List<String> fplmns) {
try {
ITelephony telephony = getITelephony();
- if (telephony == null) return 0;
+ if (telephony == null) return -1;
return telephony.setForbiddenPlmns(
getSubId(), APPTYPE_USIM, fplmns, getOpPackageName());
} catch (RemoteException ex) {
@@ -6756,7 +6757,7 @@ public class TelephonyManager {
// This could happen before phone starts
Rlog.e(TAG, "setForbiddenPlmns NullPointerException: " + ex.getMessage());
}
- return 0;
+ return -1;
}
/**