Loading telephony/java/android/telephony/TelephonyManager.java +29 −0 Original line number Diff line number Diff line Loading @@ -9274,6 +9274,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 Loading telephony/java/com/android/internal/telephony/ITelephony.aidl +6 −0 Original line number Diff line number Diff line Loading @@ -2352,4 +2352,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(); } Loading
telephony/java/android/telephony/TelephonyManager.java +29 −0 Original line number Diff line number Diff line Loading @@ -9274,6 +9274,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 Loading
telephony/java/com/android/internal/telephony/ITelephony.aidl +6 −0 Original line number Diff line number Diff line Loading @@ -2352,4 +2352,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(); }