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

Commit 3ffa1ff8 authored by pkanwar's avatar pkanwar Committed by fionaxu
Browse files

Updated javadocs for sendUssd APIs.

Bug: 35766546
Change-Id: I40f0addc15331184b3409b3d1b5c9dc1455d8b5b
Merged-in: I40f0addc15331184b3409b3d1b5c9dc1455d8b5b
Test: manual
parent 4898b704
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -38179,7 +38179,6 @@ package android.telephony {
    method public void listen(android.telephony.PhoneStateListener, int);
    method public java.lang.String sendEnvelopeWithStatus(java.lang.String);
    method public void sendUssdRequest(java.lang.String, android.telephony.TelephonyManager.OnReceiveUssdResponseCallback, android.os.Handler);
    method public void sendUssdRequest(java.lang.String, int, android.telephony.TelephonyManager.OnReceiveUssdResponseCallback, android.os.Handler);
    method public void setDataEnabled(boolean);
    method public boolean setLine1NumberForDisplay(java.lang.String, java.lang.String);
    method public boolean setOperatorBrandOverride(java.lang.String);
+0 −1
Original line number Diff line number Diff line
@@ -41403,7 +41403,6 @@ package android.telephony {
    method public boolean needsOtaServiceProvisioning();
    method public java.lang.String sendEnvelopeWithStatus(java.lang.String);
    method public void sendUssdRequest(java.lang.String, android.telephony.TelephonyManager.OnReceiveUssdResponseCallback, android.os.Handler);
    method public void sendUssdRequest(java.lang.String, int, android.telephony.TelephonyManager.OnReceiveUssdResponseCallback, android.os.Handler);
    method public int setAllowedCarriers(int, java.util.List<android.service.carrier.CarrierIdentifier>);
    method public void setDataEnabled(boolean);
    method public void setDataEnabled(int, boolean);
+0 −1
Original line number Diff line number Diff line
@@ -38278,7 +38278,6 @@ package android.telephony {
    method public void listen(android.telephony.PhoneStateListener, int);
    method public java.lang.String sendEnvelopeWithStatus(java.lang.String);
    method public void sendUssdRequest(java.lang.String, android.telephony.TelephonyManager.OnReceiveUssdResponseCallback, android.os.Handler);
    method public void sendUssdRequest(java.lang.String, int, android.telephony.TelephonyManager.OnReceiveUssdResponseCallback, android.os.Handler);
    method public void setDataEnabled(boolean);
    method public boolean setLine1NumberForDisplay(java.lang.String, java.lang.String);
    method public boolean setOperatorBrandOverride(java.lang.String);
+11 −16
Original line number Diff line number Diff line
@@ -5057,26 +5057,21 @@ public class TelephonyManager {
       public void onReceiveUssdResponseFailed(String request, int failureCode) {};
    }

    /* <p>Requires permission:
     * @link android.Manifest.permission#CALL_PHONE}
    /**
     * Sends an Unstructured Supplementary Service Data (USSD) request to the cellular network and
     * informs the caller of the response via {@code callback}.
     * <p>Carriers define USSD codes which can be sent by the user to request information such as
     * the user's current data balance or minutes balance.
     * <p>Requires permission:
     * {@link android.Manifest.permission#CALL_PHONE}
     * @param ussdRequest the USSD command to be executed.
     * @param wrappedCallback receives a callback result.
     * @param callback called by the framework to inform the caller of the result of executing the
     *                 USSD request (see {@link OnReceiveUssdResponseCallback}).
     * @param handler the {@link Handler} to run the request on.
     */
    @RequiresPermission(android.Manifest.permission.CALL_PHONE)
    public void sendUssdRequest(String ussdRequest,
                                final OnReceiveUssdResponseCallback callback, Handler handler) {
        sendUssdRequest(ussdRequest, getSubId(), callback, handler);
    }

   /* <p>Requires permission:
    * @link android.Manifest.permission#CALL_PHONE}
    * @param subId The subscription to use.
    * @param ussdRequest the USSD command to be executed.
    * @param wrappedCallback receives a callback result.
    */
    @RequiresPermission(android.Manifest.permission.CALL_PHONE)
    public void sendUssdRequest(String ussdRequest, int subId,
                                final OnReceiveUssdResponseCallback callback, Handler handler) {
        checkNotNull(callback, "OnReceiveUssdResponseCallback cannot be null.");

        ResultReceiver wrappedCallback = new ResultReceiver(handler) {
@@ -5098,7 +5093,7 @@ public class TelephonyManager {
        try {
            ITelephony telephony = getITelephony();
            if (telephony != null) {
                telephony.handleUssdRequest(subId, ussdRequest, wrappedCallback);
                telephony.handleUssdRequest(mSubId, ussdRequest, wrappedCallback);
            }
        } catch (RemoteException e) {
            Log.e(TAG, "Error calling ITelephony#sendUSSDCode", e);