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

Commit 6eac2ee0 authored by Derek Tan's avatar Derek Tan
Browse files

Expose sendEnvelope.

Change-Id: I21565fae9ba8f163aed9104db355aecf9bae1796
parent e0a5c6ec
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -24516,6 +24516,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);
+34 −4
Original line number Diff line number Diff line
@@ -1477,6 +1477,9 @@ 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.
     */
@@ -1494,6 +1497,9 @@ 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.
@@ -1512,6 +1518,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.
@@ -1535,6 +1544,27 @@ public class TelephonyManager {
        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) {
        }
        return "";
    }

    /**
     * Read one of the NV items defined in {@link com.android.internal.telephony.RadioNVItems}.
     * Used for device configuration by some CDMA operators.
+11 −0
Original line number Diff line number Diff line
@@ -368,6 +368,17 @@ interface ITelephony {
    String iccTransmitApduLogicalChannel(int channel, int cla, int instruction,
            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.