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

Commit b8ce4444 authored by Pankaj Kanwar's avatar Pankaj Kanwar Committed by Android (Google) Code Review
Browse files

Merge "Updated javadocs for sendUssd APIs."

parents 248278fc 67819e0a
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -39946,7 +39946,6 @@ package android.telephony {
    method public boolean sendDialerCode(java.lang.String);
    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
@@ -43361,7 +43361,6 @@ package android.telephony {
    method public boolean sendDialerCode(java.lang.String);
    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
@@ -40137,7 +40137,6 @@ package android.telephony {
    method public boolean sendDialerCode(java.lang.String);
    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
@@ -5054,26 +5054,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) {
@@ -5095,7 +5090,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);