diff options
| author | 2019-12-13 13:52:31 -0800 | |
|---|---|---|
| committer | 2019-12-13 13:54:26 -0800 | |
| commit | abf9e43cb0618a499204bdc9d00341d6174a5c8b (patch) | |
| tree | b9d2b6c33a00511ec94a4c5a829aadd6245f3b71 | |
| parent | 72f579d5f26239202ab297e354873192856ed45d (diff) | |
Fix for Telephony Manager API javadoc inconsistencies
Bug: 144455918
Test: atest TelephonyManagerTest
Change-Id: Iac372f04afe210ac7d3edc6fc880ee6a7e614945
| -rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 58f1e8407d13..3429bb7b8cbe 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -6692,7 +6692,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. @@ -6706,7 +6707,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) { @@ -6715,7 +6716,7 @@ public class TelephonyManager { // This could happen before phone starts Rlog.e(TAG, "setForbiddenPlmns NullPointerException: " + ex.getMessage()); } - return 0; + return -1; } /** |