Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -38858,6 +38858,7 @@ package android.telephony { method public boolean isVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle); method public boolean isWorldPhone(); method public void listen(android.telephony.PhoneStateListener, int); 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); api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -42211,6 +42211,7 @@ package android.telephony { method public boolean isWorldPhone(); method public void listen(android.telephony.PhoneStateListener, int); method public boolean needsOtaServiceProvisioning(); 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); api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -38993,6 +38993,7 @@ package android.telephony { method public boolean isVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle); method public boolean isWorldPhone(); method public void listen(android.telephony.PhoneStateListener, int); 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); telephony/java/android/telephony/TelephonyManager.java +24 −0 Original line number Diff line number Diff line Loading @@ -2912,6 +2912,30 @@ 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 * */ 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; } } /** * Returns the IMS private user identity (IMPI) that was loaded from the ISIM. * @return the IMPI, or null if not present or not loaded Loading telephony/java/com/android/internal/telephony/ITelephony.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -506,6 +506,9 @@ interface ITelephony { oneway void sendVisualVoicemailSmsForSubscriber(in String callingPackage, in int subId, 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); /** * Returns the network type for data transmission * Legacy call, permission-free Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -38858,6 +38858,7 @@ package android.telephony { method public boolean isVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle); method public boolean isWorldPhone(); method public void listen(android.telephony.PhoneStateListener, int); 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);
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -42211,6 +42211,7 @@ package android.telephony { method public boolean isWorldPhone(); method public void listen(android.telephony.PhoneStateListener, int); method public boolean needsOtaServiceProvisioning(); 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);
api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -38993,6 +38993,7 @@ package android.telephony { method public boolean isVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle); method public boolean isWorldPhone(); method public void listen(android.telephony.PhoneStateListener, int); 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);
telephony/java/android/telephony/TelephonyManager.java +24 −0 Original line number Diff line number Diff line Loading @@ -2912,6 +2912,30 @@ 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 * */ 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; } } /** * Returns the IMS private user identity (IMPI) that was loaded from the ISIM. * @return the IMPI, or null if not present or not loaded Loading
telephony/java/com/android/internal/telephony/ITelephony.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -506,6 +506,9 @@ interface ITelephony { oneway void sendVisualVoicemailSmsForSubscriber(in String callingPackage, in int subId, 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); /** * Returns the network type for data transmission * Legacy call, permission-free Loading