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

Commit cb88a3a8 authored by Preeti Ahuja's avatar Preeti Ahuja Committed by Linux Build Service Account
Browse files

SEEK: Following changes have been made for SEEK

1. Add support for getAtr api.
   Implement getAtr() for SEEK on Android.

2. Add Multi Sim support for SEEK.

   MSim support for the following apis has been added:

   1. iccOpenLogicalChannel
   2. iccCloseLogicalChannel
   3. iccTransmitApduLogicalChannel
   4. iccTransmitApduBasicChannel
   5. iccExchangeSimIO
   6. getAtr

Conflicts:
	telephony/java/com/android/internal/telephony/ITelephony.aidl
	telephony/java/com/android/internal/telephony/RILConstants.java

Change-Id: If03cbd4f3b108b77ba7998a605776c8626290cee
parent be256883
Loading
Loading
Loading
Loading
+94 −0
Original line number Diff line number Diff line
@@ -514,6 +514,18 @@ interface ITelephony {
     */
    IccOpenLogicalChannelResponse iccOpenLogicalChannel(String AID);


    /**
     * Opens a logical channel to the ICC card for a particular subId.
     *
     * Input parameters equivalent to TS 27.007 AT+CCHO command.
     *
     * @param subId user preferred subId.
     * @param AID Application id. See ETSI 102.221 and 101.220.
     * @return an IccOpenLogicalChannelResponse object.
     */
    IccOpenLogicalChannelResponse iccOpenLogicalChannelUsingSubId(long subId, String AID);

    /**
     * Closes a previously opened logical channel to the ICC card.
     *
@@ -525,6 +537,19 @@ interface ITelephony {
     */
    boolean iccCloseLogicalChannel(int channel);

    /**
     * Closes a previously opened logical channel to the ICC card for a
     * particular subId.
     *
     * Input parameters equivalent to TS 27.007 AT+CCHC command.
     *
     * @param subId user preferred subId.
     * @param channel is the channel id to be closed as retruned by a
     *            successful iccOpenLogicalChannel.
     * @return true if the channel was closed successfully.
     */
    boolean iccCloseLogicalChannelUsingSubId(long subId, int channel);

    /**
     * Transmit an APDU to the ICC card over a logical channel.
     *
@@ -545,6 +570,28 @@ interface ITelephony {
    String iccTransmitApduLogicalChannel(int channel, int cla, int instruction,
            int p1, int p2, int p3, String data);

    /**
     * Transmit an APDU to the ICC card over a logical channel for a
     * particular subId.
     *
     * Input parameters equivalent to TS 27.007 AT+CGLA command.
     *
     * @param subId user preferred subId.
     * @param channel is the channel id to be closed as retruned by a
     *            successful iccOpenLogicalChannel.
     * @param cla Class of the APDU command.
     * @param instruction Instruction of the APDU command.
     * @param p1 P1 value of the APDU command.
     * @param p2 P2 value of the APDU command.
     * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU
     *            is sent to the SIM.
     * @param data Data to be sent with the APDU.
     * @return The APDU response from the ICC card with the status appended at
     *            the end.
     */
    String iccTransmitApduLogicalChannelUsingSubId(long subId, int channel, int cla,
            int instruction, int p1, int p2, int p3, String data);

    /**
     * Transmit an APDU to the ICC card over the basic channel.
     *
@@ -563,6 +610,26 @@ interface ITelephony {
    String iccTransmitApduBasicChannel(int cla, int instruction,
            int p1, int p2, int p3, String data);

    /**
     * Transmit an APDU to the ICC card over the basic channel for a particular
     * subId.
     *
     * Input parameters equivalent to TS 27.007 AT+CSIM command.
     *
     * @param subId user preferred subId.
     * @param cla Class of the APDU command.
     * @param instruction Instruction of the APDU command.
     * @param p1 P1 value of the APDU command.
     * @param p2 P2 value of the APDU command.
     * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU
     *            is sent to the SIM.
     * @param data Data to be sent with the APDU.
     * @return The APDU response from the ICC card with the status appended at
     *            the end.
     */
    String iccTransmitApduBasicChannelUsingSubId(long subId, int cla, int instruction,
            int p1, int p2, int p3, String data);

    /**
     * Returns the response APDU for a command APDU sent through SIM_IO.
     *
@@ -577,6 +644,22 @@ interface ITelephony {
    byte[] iccExchangeSimIO(int fileID, int command, int p1, int p2, int p3,
            String filePath);

    /**
     * Returns the response APDU for a command APDU sent through SIM_IO
     * for a particular subId.
     *
     * @param subId user preferred subId.
     * @param fileID
     * @param command
     * @param p1 P1 value of the APDU command.
     * @param p2 P2 value of the APDU command.
     * @param p3 P3 value of the APDU command.
     * @param filePath
     * @return The APDU response.
     */
    byte[] iccExchangeSimIOUsingSubId(long subId, int fileID, int command, int p1, int p2,
            int p3, String filePath);

    /**
     * Send ENVELOPE to the SIM and returns the response.
     *
@@ -802,6 +885,17 @@ interface ITelephony {
     */
    int invokeOemRilRequestRaw(in byte[] oemReq, out byte[] oemResp);

    /**
     * Get ATR (Answer To Reset; as per ISO/IEC 7816-4) from SIM card
     */
    byte[] getAtr();

    /**
     * Get ATR (Answer To Reset; as per ISO/IEC 7816-4) from SIM card
     * for a particular subId.
     */
    byte[] getAtrUsingSubId(long subId);

    /**
     * Check if any mobile Radios need to be shutdown.
     *
+2 −0
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ public interface RILConstants {
    int SUBSCRIPTION_NOT_SUPPORTED = 26;      /* Subscription not supported */
    int MISSING_RESOURCE = 27;                /* no logical channel available */
    int NO_SUCH_ELEMENT = 28;                 /* application not found on SIM */
    int INVALID_PARAMETER = 29;

    /* NETWORK_MODE_* See ril.h RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE */
    int NETWORK_MODE_WCDMA_PREF     = 0; /* GSM/WCDMA (WCDMA preferred) */
@@ -316,6 +317,7 @@ cat include/telephony/ril.h | \
    int RIL_REQUEST_SET_DATA_PROFILE = 128;
    int RIL_REQUEST_SHUTDOWN = 129;
    int RIL_REQUEST_GET_DATA_CALL_PROFILE = 130;
    int RIL_REQUEST_SIM_GET_ATR = 131;

    int RIL_UNSOL_RESPONSE_BASE = 1000;
    int RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED = 1000;