Merge "Fix for Telephony Manager API javadoc inconsistencies" am: 59b88e0e6a am: 8a13455417 am: 61f1ecb238

Change-Id: I86bd891e9ed47af993cd7f573a122df06298f8ae
This commit is contained in:
Automerger Merge Worker
2019-12-17 01:28:31 +00:00

View File

@@ -6804,7 +6804,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.
@@ -6818,7 +6819,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(), getFeatureId());
} catch (RemoteException ex) {
@@ -6827,7 +6828,7 @@ public class TelephonyManager {
// This could happen before phone starts
Rlog.e(TAG, "setForbiddenPlmns NullPointerException: " + ex.getMessage());
}
return 0;
return -1;
}
/**