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

Commit 15449e96 authored by Chiachang Wang's avatar Chiachang Wang Committed by Automerger Merge Worker
Browse files

Merge "Create getMobileProvisioningUrl in telephony" am: cdf7105f am: 650317e4 am: 3eab903e

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1532907

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I36823fd39cda558ee5c3eef9d7ef55d44a3c466c
parents f7864f3e 3eab903e
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
@@ -9337,6 +9337,35 @@ public class TelephonyManager {
        return false;
    }
    /**
     * Get the mobile provisioning url that is used to launch a browser to allow users to manage
     * their mobile plan.
     *
     * <p>Requires Permission:
     * {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE}.
     *
     * TODO: The legacy design only supports single sim design. Ideally, this should support
     * multi-sim design in current world.
     *
     * {@hide}
     */
    @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
    public @Nullable String getMobileProvisioningUrl() {
        try {
            final ITelephony service = getITelephony();
            if (service != null) {
                return service.getMobileProvisioningUrl();
            } else {
                throw new IllegalStateException("telephony service is null.");
            }
        } catch (RemoteException ex) {
            if (!isSystemProcess()) {
                ex.rethrowAsRuntimeException();
            }
        }
        return null;
    }
    /**
     * Turns mobile data on or off.
     * If this object has been created with {@link #createForSubscriptionId}, applies to the given
+6 −0
Original line number Diff line number Diff line
@@ -2369,4 +2369,10 @@ interface ITelephony {
     * Gets the config of RCS VoLTE single registration enabled for the carrier/subscription.
     */
    boolean getCarrierSingleRegistrationEnabled(int subId);

    /**
     *  Return the mobile provisioning url that is used to launch a browser to allow users to manage
     *  their mobile plan.
     */
    String getMobileProvisioningUrl();
}