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

Commit 96a2614e authored by Amit Mahajan's avatar Amit Mahajan Committed by Android (Google) Code Review
Browse files

Merge "Add p2 option in OpenLogicalChannel" into oc-dev

parents b42bed23 c6676c9a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1786,10 +1786,11 @@ public interface CommandsInterface {
     * Input parameters equivalent to TS 27.007 AT+CCHO command.
     *
     * @param AID Application id. See ETSI 102.221 and 101.220.
     * @param p2 P2 parameter (described in ISO 7816-4).
     * @param response Callback message. response.obj will be an int [1] with
     *            element [0] set to the id of the logical channel.
     */
    public void iccOpenLogicalChannel(String AID, Message response);
    public void iccOpenLogicalChannel(String AID, int p2, Message response);

    /**
     * Close a previously opened logical channel to the SIM.
+4 −3
Original line number Diff line number Diff line
@@ -3068,18 +3068,19 @@ public final class RIL extends BaseCommands implements CommandsInterface {
    }

    @Override
    public void iccOpenLogicalChannel(String aid, Message result) {
    public void iccOpenLogicalChannel(String aid, int p2, Message result) {
        IRadio radioProxy = getRadioProxy(result);
        if (radioProxy != null) {
            RILRequest rr = obtainRequest(RIL_REQUEST_SIM_OPEN_CHANNEL, result,
                    mRILDefaultWorkSource);

            if (RILJ_LOGD) {
                riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " aid = " + aid);
                riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " aid = " + aid
                        + " p2 = " + p2);
            }

            try {
                radioProxy.iccOpenLogicalChannel(rr.mSerial, convertNullToEmptyString(aid));
                radioProxy.iccOpenLogicalChannel(rr.mSerial, convertNullToEmptyString(aid), p2);
            } catch (RemoteException | RuntimeException e) {
                handleRadioProxyExceptionForRR(rr, "iccOpenLogicalChannel", e);
            }
+1 −1
Original line number Diff line number Diff line
@@ -558,7 +558,7 @@ class ImsPhoneCommandInterface extends BaseCommands implements CommandsInterface
    }

    @Override
    public void iccOpenLogicalChannel(String AID, Message response) {}
    public void iccOpenLogicalChannel(String AID, int p2, Message response) {}

    @Override
    public void iccCloseLogicalChannel(int channel, Message response) {}
+1 −1
Original line number Diff line number Diff line
@@ -559,7 +559,7 @@ class SipCommandInterface extends BaseCommands implements CommandsInterface {
    }

    @Override
    public void iccOpenLogicalChannel(String AID, Message response) {
    public void iccOpenLogicalChannel(String AID, int p2, Message response) {
    }

    @Override
+3 −3
Original line number Diff line number Diff line
@@ -1864,8 +1864,8 @@ public class SimulatedCommands extends BaseCommands
    }

    @Override
    public void iccOpenLogicalChannel(String AID, Message response) {
        SimulatedCommandsVerifier.getInstance().iccOpenLogicalChannel(AID, response);
    public void iccOpenLogicalChannel(String AID, int p2, Message response) {
        SimulatedCommandsVerifier.getInstance().iccOpenLogicalChannel(AID, p2, response);
        Object result = new int[]{mChannelId};
        resultSuccess(response, result);
    }
Loading