Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6c5163a authored by Shi Lu's avatar Shi Lu Committed by Android (Google) Code Review
Browse files

Merge "API Review: getManualNetworkSelectionPlmn"

parents cb7f4ff4 458ea448
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -48167,7 +48167,7 @@ package android.telephony {
    method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public String getImei();
    method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public String getImei(int);
    method @RequiresPermission(anyOf={android.Manifest.permission.READ_PHONE_STATE, android.Manifest.permission.READ_SMS, android.Manifest.permission.READ_PHONE_NUMBERS}) public String getLine1Number();
    method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE) public String getManualNetworkSelectionPlmn();
    method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE) public String getManualNetworkSelectionPlmn();
    method @Nullable public String getManufacturerCode();
    method @Nullable public String getManufacturerCode(int);
    method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public String getMeid();
+4 −4
Original line number Diff line number Diff line
@@ -7992,17 +7992,17 @@ public class TelephonyManager {

    /**
     * Get the PLMN chosen for Manual Network Selection if active.
     * Return empty string if in automatic selection.
     * Return null string if in automatic selection.
     *
     * <p>Requires Permission: {@link android.Manifest.permission#READ_PRECISE_PHONE_STATE
     * READ_PRECISE_PHONE_STATE} or that the calling app has carrier privileges
     * (see {@link #hasCarrierPrivileges})
     *
     * @return manually selected network info on success or empty string on failure
     * @return manually selected network info on success or null string on failure
     */
    @SuppressAutoDoc // No support carrier privileges (b/72967236).
    @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE)
    public @NonNull String getManualNetworkSelectionPlmn() {
    public @Nullable String getManualNetworkSelectionPlmn() {
        try {
            ITelephony telephony = getITelephony();
            if (telephony != null && isManualNetworkSelectionAllowed()) {
@@ -8011,7 +8011,7 @@ public class TelephonyManager {
        } catch (RemoteException ex) {
            Rlog.e(TAG, "getManualNetworkSelectionPlmn RemoteException", ex);
        }
        return "";
        return null;
    }

    /**
+1 −1
Original line number Diff line number Diff line
@@ -2261,7 +2261,7 @@ interface ITelephony {

    /**
     * Get the user manual network selection.
     * Return empty string if in automatic selection.
     * Return null if inactive or phone process is down.
     *
     * @param subId the id of the subscription
     * @return operatorinfo on success