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

Commit b32d1c83 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.

CRs-Fixed: 718469
Change-Id: If03cbd4f3b108b77ba7998a605776c8626290cee

Add P2 option in openLogicalChannel.

- Add support for iccOpenLogicalChannelWithP2.
- Needed to support OMAPI 3.0 defined
by SIM Alliance.

Change-Id: I2ab6cfb7a54c451f32936df51b8298f35a6dc67f
CRs-Fixed: 948787
parent 65299952
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -3066,6 +3066,28 @@ public class TelephonyManager {
        return null;
    }

    /**
     * Opens a logical channel to the ICC card for the given subId
     *
     * @param subId subid to send the command to
     * @param AID applcation id. See ETSI 102.221 and 101.220.
     * @param p2 byte P2 parameter
     * @return an IccOpenLogicalChannelResponse object
     * @hide
     */
    public IccOpenLogicalChannelResponse iccOpenLogicalChannel(int subId,
                String AID, byte p2) {
        try {
            ITelephony telephony = getITelephony();
            if (telephony != null) {
                return telephony.iccOpenLogicalChannelWithP2(subId, AID, p2);
            }
        } catch (RemoteException ex) {
        } catch (NullPointerException ex) {
        }
        return null;
    }

    /**
     * Closes a previously opened logical channel to the ICC card.
     *
+16 −0
Original line number Diff line number Diff line
@@ -545,6 +545,16 @@ interface ITelephony {
     */
    IccOpenLogicalChannelResponse iccOpenLogicalChannel(int subId, String AID);

    /**
     * Opens a logical channel to the ICC card for a particular subID
     *
     * @param subId user preferred subId.
     * @param p2 P2 parameter
     * @param AID Application id. See ETSI 102.221 and 101.220
     */
    IccOpenLogicalChannelResponse iccOpenLogicalChannelWithP2(int subId,
        String AID, byte p2);

    /**
     * Closes a previously opened logical channel to the ICC card.
     *
@@ -1067,4 +1077,10 @@ interface ITelephony {
     * Returns a list of packages that have carrier privileges.
     */
    List<String> getPackagesWithCarrierPrivileges();

    /**
     * Get ATR (Answer To Reset; as per ISO/IEC 7816-4) from SIM card
     * for a particular subId.
     */
    byte[] getAtr(int subId);
}
+3 −0
Original line number Diff line number Diff line
@@ -105,6 +105,7 @@ public interface RILConstants {
    int DEVICE_IN_USE = 64;                   /* Operation cannot be performed because the device
                                                 is currently in use */
    int ABORTED = 65;                         /* Operation aborted */
    int INVALID_PARAMETER = 66;
    // Below is list of OEM specific error codes which can by used by OEMs in case they don't want to
    // reveal particular replacement for Generic failure
    int OEM_ERROR_1 = 501;
@@ -409,6 +410,8 @@ cat include/telephony/ril.h | \
    int RIL_REQUEST_STOP_LCE = 133;
    int RIL_REQUEST_PULL_LCEDATA = 134;
    int RIL_REQUEST_GET_ACTIVITY_INFO = 135;
    int RIL_REQUEST_SIM_GET_ATR = 136;
    int RIL_REQUEST_CAF_SIM_OPEN_CHANNEL_WITH_P2 = 137;

    int RIL_RESPONSE_ACKNOWLEDGEMENT = 800;