diff options
-rw-r--r-- | api/current.txt | 1 | ||||
-rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 11 | ||||
-rw-r--r-- | telephony/java/com/android/internal/telephony/ITelephony.aidl | 9 |
3 files changed, 12 insertions, 9 deletions
diff --git a/api/current.txt b/api/current.txt index d3aaf2c..907c3b8 100644 --- a/api/current.txt +++ b/api/current.txt @@ -27112,6 +27112,7 @@ package android.telephony { method public java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, java.lang.String); method public boolean isNetworkRoaming(); method public void listen(android.telephony.PhoneStateListener, int); + method public java.lang.String sendEnvelopeWithStatus(java.lang.String); field public static final java.lang.String ACTION_PHONE_STATE_CHANGED = "android.intent.action.PHONE_STATE"; field public static final java.lang.String ACTION_RESPOND_VIA_MESSAGE = "android.intent.action.RESPOND_VIA_MESSAGE"; field public static final int CALL_STATE_IDLE = 0; // 0x0 diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 7733222..2bf9ef1 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -1841,8 +1841,7 @@ public class TelephonyManager { } /** - * Send ENVELOPE to the SIM, after processing a proactive command sent by - * the SIM. + * Send ENVELOPE to the SIM and return the response. * * <p>Requires Permission: * {@link android.Manifest.permission#SIM_COMMUNICATION SIM_COMMUNICATION} @@ -1850,11 +1849,13 @@ public class TelephonyManager { * @param content String containing SAT/USAT response in hexadecimal * format starting with command tag. See TS 102 223 for * details. - * @return The APDU response from the ICC card. + * @return The APDU response from the ICC card, with the last 4 bytes + * being the status word. If the command fails, returns an empty + * string. */ - public String sendEnvelope(String content) { + public String sendEnvelopeWithStatus(String content) { try { - return getITelephony().sendEnvelope(content); + return getITelephony().sendEnvelopeWithStatus(content); } catch (RemoteException ex) { } catch (NullPointerException ex) { } diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index 9cbf66e..8b80bfa 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -373,15 +373,16 @@ interface ITelephony { int p1, int p2, int p3, String data); /** - * Send ENVELOPE to the SIM, after processing a proactive command sent by - * the SIM. + * Send ENVELOPE to the SIM and returns the response. * * @param contents String containing SAT/USAT response in hexadecimal * format starting with command tag. See TS 102 223 for * details. - * @return The APDU response from the ICC card. + * @return The APDU response from the ICC card, with the last 4 bytes + * being the status word. If the command fails, returns an empty + * string. */ - String sendEnvelope(String content); + String sendEnvelopeWithStatus(String content); /** * Read one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}. |