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

Commit cf828f2e authored by fionaxu's avatar fionaxu Committed by Chen Xu
Browse files

remove deprecated API sendDialerCode

Bug: 35767402
Test: run cts -m CtsPermissionTestCases -t
android.permission.cts.TelephonyManagerPermissionTest

Change-Id: I738cb5680e598ff84ad09f9c2d1cb18b01ad7d06
parent 7a0fef93
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -40011,7 +40011,6 @@ package android.telephony {
    method public boolean isVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle);
    method public boolean isVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle);
    method public boolean isWorldPhone();
    method public boolean isWorldPhone();
    method public void listen(android.telephony.PhoneStateListener, int);
    method public void listen(android.telephony.PhoneStateListener, int);
    method public deprecated boolean sendDialerCode(java.lang.String);
    method public void sendDialerSpecialCode(java.lang.String);
    method public void sendDialerSpecialCode(java.lang.String);
    method public java.lang.String sendEnvelopeWithStatus(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, android.telephony.TelephonyManager.OnReceiveUssdResponseCallback, android.os.Handler);
+0 −1
Original line number Original line Diff line number Diff line
@@ -43418,7 +43418,6 @@ package android.telephony {
    method public boolean isWorldPhone();
    method public boolean isWorldPhone();
    method public void listen(android.telephony.PhoneStateListener, int);
    method public void listen(android.telephony.PhoneStateListener, int);
    method public boolean needsOtaServiceProvisioning();
    method public boolean needsOtaServiceProvisioning();
    method public deprecated boolean sendDialerCode(java.lang.String);
    method public void sendDialerSpecialCode(java.lang.String);
    method public void sendDialerSpecialCode(java.lang.String);
    method public java.lang.String sendEnvelopeWithStatus(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, android.telephony.TelephonyManager.OnReceiveUssdResponseCallback, android.os.Handler);
+0 −1
Original line number Original line Diff line number Diff line
@@ -40214,7 +40214,6 @@ package android.telephony {
    method public boolean isVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle);
    method public boolean isVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle);
    method public boolean isWorldPhone();
    method public boolean isWorldPhone();
    method public void listen(android.telephony.PhoneStateListener, int);
    method public void listen(android.telephony.PhoneStateListener, int);
    method public deprecated boolean sendDialerCode(java.lang.String);
    method public void sendDialerSpecialCode(java.lang.String);
    method public void sendDialerSpecialCode(java.lang.String);
    method public java.lang.String sendEnvelopeWithStatus(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, android.telephony.TelephonyManager.OnReceiveUssdResponseCallback, android.os.Handler);
+0 −24
Original line number Original line Diff line number Diff line
@@ -3108,30 +3108,6 @@ public class TelephonyManager {
        }
        }
    }
    }


    /**
     * Send the special dialer code. The IPC caller must be the current default dialer.
     * <p>
     * Requires Permission:
     *   {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
     *
     * @param inputCode The special dialer code to send which follows the format of *#*#<code>#*#*
     * @return true if sent sucessfully, false otherwise
     * @deprecated use {@link #sendDialerSpecialCode(String)} ()} instead.
     */
    public boolean sendDialerCode(String inputCode) {
        try {
            final ITelephony telephony = getITelephony();
            if (telephony == null) {
                Log.e(TAG, "Telephony service unavailable");
                return false;
            }
            return telephony.sendDialerCode(mContext.getOpPackageName(), inputCode);
        } catch (RemoteException | NullPointerException ex) {
            // This could happen before phone restarts due to crashing
            return false;
        }
    }

    /**
    /**
     * Send the special dialer code. The IPC caller must be the current default dialer or has
     * Send the special dialer code. The IPC caller must be the current default dialer or has
     * carrier privileges.
     * carrier privileges.
+0 −3
Original line number Original line Diff line number Diff line
@@ -529,9 +529,6 @@ interface ITelephony {
    void sendVisualVoicemailSmsForSubscriber(in String callingPackage, in int subId,
    void sendVisualVoicemailSmsForSubscriber(in String callingPackage, in int subId,
            in String number, in int port, in String text, in PendingIntent sentIntent);
            in String number, in int port, in String text, in PendingIntent sentIntent);


    // Send the special dialer code. The IPC caller must be the current default dialer.
    boolean sendDialerCode(String callingPackageName, String inputCode);

    // Send the special dialer code. The IPC caller must be the current default dialer.
    // Send the special dialer code. The IPC caller must be the current default dialer.
    void sendDialerSpecialCode(String callingPackageName, String inputCode);
    void sendDialerSpecialCode(String callingPackageName, String inputCode);