summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/current.txt1
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java38
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl11
3 files changed, 46 insertions, 4 deletions
diff --git a/api/current.txt b/api/current.txt
index daa8ef0..9d99e7b 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -24517,6 +24517,7 @@ package android.telephony {
method public boolean hasIccCard();
method public boolean iccCloseLogicalChannel(int);
method public int iccOpenLogicalChannel(java.lang.String);
+ method public java.lang.String sendEnvelope(java.lang.String);
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);
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index c1a4630..e5f9a55 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -1738,12 +1738,15 @@ public class TelephonyManager {
*
* Input parameters equivalent to TS 27.007 AT+CCHO command.
*
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#SIM_COMMUNICATION SIM_COMMUNICATION}
+ *
* @param AID Application id. See ETSI 102.221 and 101.220.
* @return The logical channel id which is negative on error.
*/
public int iccOpenLogicalChannel(String AID) {
try {
- return getITelephony().iccOpenLogicalChannel(AID);
+ return getITelephony().iccOpenLogicalChannel(AID);
} catch (RemoteException ex) {
} catch (NullPointerException ex) {
}
@@ -1755,13 +1758,16 @@ public class TelephonyManager {
*
* Input parameters equivalent to TS 27.007 AT+CCHC command.
*
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#SIM_COMMUNICATION SIM_COMMUNICATION}
+ *
* @param channel is the channel id to be closed as retruned by a successful
* iccOpenLogicalChannel.
* @return true if the channel was closed successfully.
*/
public boolean iccCloseLogicalChannel(int channel) {
try {
- return getITelephony().iccCloseLogicalChannel(channel);
+ return getITelephony().iccCloseLogicalChannel(channel);
} catch (RemoteException ex) {
} catch (NullPointerException ex) {
}
@@ -1773,6 +1779,9 @@ public class TelephonyManager {
*
* Input parameters equivalent to TS 27.007 AT+CGLA command.
*
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#SIM_COMMUNICATION SIM_COMMUNICATION}
+ *
* @param channel is the channel id to be closed as returned by a successful
* iccOpenLogicalChannel.
* @param cla Class of the APDU command.
@@ -1788,8 +1797,29 @@ public class TelephonyManager {
public String iccTransmitApduLogicalChannel(int channel, int cla,
int instruction, int p1, int p2, int p3, String data) {
try {
- return getITelephony().iccTransmitApduLogicalChannel(channel, cla,
- instruction, p1, p2, p3, data);
+ return getITelephony().iccTransmitApduLogicalChannel(channel, cla,
+ instruction, p1, p2, p3, data);
+ } catch (RemoteException ex) {
+ } catch (NullPointerException ex) {
+ }
+ return "";
+ }
+
+ /**
+ * Send ENVELOPE to the SIM, after processing a proactive command sent by
+ * the SIM.
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#SIM_COMMUNICATION SIM_COMMUNICATION}
+ *
+ * @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.
+ */
+ public String sendEnvelope(String content) {
+ try {
+ return getITelephony().sendEnvelope(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 3ff5a52..5f490af 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -369,6 +369,17 @@ interface ITelephony {
int p1, int p2, int p3, String data);
/**
+ * Send ENVELOPE to the SIM, after processing a proactive command sent by
+ * the SIM.
+ *
+ * @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.
+ */
+ String sendEnvelope(String content);
+
+ /**
* Read one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}.
* Used for device configuration by some CDMA operators.
*