Loading src/java/com/android/internal/telephony/CommandsInterface.java +18 −0 Original line number Diff line number Diff line Loading @@ -2115,11 +2115,29 @@ public interface CommandsInterface { * * Input parameters equivalent to TS 27.007 AT+CCHC command. * * Starting with Android U, use {@link #iccCloseLogicalChannel(int, boolean, Message)}} * API to close the logical channel if the channel was opened to perform ES10 operations. * * @param channel Channel id. Id of the channel to be closed. * @param response Callback message. */ public void iccCloseLogicalChannel(int channel, Message response); /** * Close a previously opened logical channel to the SIM. * * Input parameters equivalent to TS 27.007 AT+CCHC command. * * Per spec SGP.22 V3.0, ES10 commands needs to be sent over command port of MEP-A. In order * to close proper logical channel, should pass information about whether the logical channel * was opened for sending ES10 commands or not. * * @param channel Channel id. Id of the channel to be closed. * @param isEs10 Whether the logical channel is opened to perform ES10 operations. * @param response Callback message. */ public void iccCloseLogicalChannel(int channel, boolean isEs10, Message response); /** * Exchange APDUs with the SIM on a logical channel. * Loading src/java/com/android/internal/telephony/RIL.java +7 −3 Original line number Diff line number Diff line Loading @@ -4122,6 +4122,11 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void iccCloseLogicalChannel(int channel, Message result) { iccCloseLogicalChannel(channel, false, result); } @Override public void iccCloseLogicalChannel(int channel, boolean isEs10, Message result) { RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class, result); if (!simProxy.isEmpty()) { RILRequest rr = obtainRequest(RIL_REQUEST_SIM_CLOSE_CHANNEL, result, Loading @@ -4129,11 +4134,10 @@ public class RIL extends BaseCommands implements CommandsInterface { if (RILJ_LOGD) { riljLog(rr.serialString() + "> " + RILUtils.requestToString(rr.mRequest) + " channel = " + channel); + " channel = " + channel + " isEs10 = " + isEs10); } try { simProxy.iccCloseLogicalChannel(rr.mSerial, channel); simProxy.iccCloseLogicalChannel(rr.mSerial, channel, isEs10); } catch (RemoteException | RuntimeException e) { handleRadioProxyExceptionForRR(HAL_SERVICE_SIM, "iccCloseLogicalChannel", e); } Loading src/java/com/android/internal/telephony/RadioSimProxy.java +15 −2 Original line number Diff line number Diff line Loading @@ -272,14 +272,27 @@ public class RadioSimProxy extends RadioServiceProxy { } /** * Call IRadioSim#iccCloseLogicalChannel * Call IRadioSim#iccCloseLogicalChannelWithSessionInfo * @param serial Serial number of request * @param channelId Channel ID of the channel to be closed * @param isEs10 Whether the logical channel is opened for performing ES10 operations. * @throws RemoteException */ public void iccCloseLogicalChannel(int serial, int channelId) throws RemoteException { public void iccCloseLogicalChannel(int serial, int channelId, boolean isEs10) throws RemoteException { if (isEmpty()) return; if (isAidl()) { if (mHalVersion.greaterOrEqual(RIL.RADIO_HAL_VERSION_2_1)) { // TODO: [MEP-A1] Use iccCloseLogicalChannelWithSessionInfo API once vendor // changes are completed. //android.hardware.radio.sim.SessionInfo info = // new android.hardware.radio.sim.SessionInfo(); //info.sessionId = channelId; //info.isEs10 = isEs10; //mSimProxy.iccCloseLogicalChannelWithSessionInfo(serial, info); mSimProxy.iccCloseLogicalChannel(serial, channelId); return; } mSimProxy.iccCloseLogicalChannel(serial, channelId); } else { mRadioProxy.iccCloseLogicalChannel(serial, channelId); Loading src/java/com/android/internal/telephony/imsphone/ImsPhoneCommandInterface.java +3 −0 Original line number Diff line number Diff line Loading @@ -609,6 +609,9 @@ class ImsPhoneCommandInterface extends BaseCommands implements CommandsInterface @Override public void iccCloseLogicalChannel(int channel, Message response) {} @Override public void iccCloseLogicalChannel(int channel, boolean isEs10, Message response) {} @Override public void iccTransmitApduLogicalChannel(int channel, int cla, int instruction, int p1, int p2, int p3, String data, Loading src/java/com/android/internal/telephony/uicc/euicc/apdu/CloseLogicalChannelInvocation.java +4 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,10 @@ class CloseLogicalChannelInvocation extends AsyncMessageInvocation<Integer, Bool @Override protected void sendRequestMessage(Integer channel, Message msg) { Rlog.v(LOG_TAG, "Channel: " + channel); mCi.iccCloseLogicalChannel(channel, msg); // TODO: Currently CloseLogicalChannelInvocation is used from ApduSender for closing the // channel opened on ISD-R. Hence passing isEs10 as true by default. // Should modify the logic in future if the ApduSender is used with non ISD-R AID. mCi.iccCloseLogicalChannel(channel, true /*isEs10*/, msg); } @Override Loading Loading
src/java/com/android/internal/telephony/CommandsInterface.java +18 −0 Original line number Diff line number Diff line Loading @@ -2115,11 +2115,29 @@ public interface CommandsInterface { * * Input parameters equivalent to TS 27.007 AT+CCHC command. * * Starting with Android U, use {@link #iccCloseLogicalChannel(int, boolean, Message)}} * API to close the logical channel if the channel was opened to perform ES10 operations. * * @param channel Channel id. Id of the channel to be closed. * @param response Callback message. */ public void iccCloseLogicalChannel(int channel, Message response); /** * Close a previously opened logical channel to the SIM. * * Input parameters equivalent to TS 27.007 AT+CCHC command. * * Per spec SGP.22 V3.0, ES10 commands needs to be sent over command port of MEP-A. In order * to close proper logical channel, should pass information about whether the logical channel * was opened for sending ES10 commands or not. * * @param channel Channel id. Id of the channel to be closed. * @param isEs10 Whether the logical channel is opened to perform ES10 operations. * @param response Callback message. */ public void iccCloseLogicalChannel(int channel, boolean isEs10, Message response); /** * Exchange APDUs with the SIM on a logical channel. * Loading
src/java/com/android/internal/telephony/RIL.java +7 −3 Original line number Diff line number Diff line Loading @@ -4122,6 +4122,11 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void iccCloseLogicalChannel(int channel, Message result) { iccCloseLogicalChannel(channel, false, result); } @Override public void iccCloseLogicalChannel(int channel, boolean isEs10, Message result) { RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class, result); if (!simProxy.isEmpty()) { RILRequest rr = obtainRequest(RIL_REQUEST_SIM_CLOSE_CHANNEL, result, Loading @@ -4129,11 +4134,10 @@ public class RIL extends BaseCommands implements CommandsInterface { if (RILJ_LOGD) { riljLog(rr.serialString() + "> " + RILUtils.requestToString(rr.mRequest) + " channel = " + channel); + " channel = " + channel + " isEs10 = " + isEs10); } try { simProxy.iccCloseLogicalChannel(rr.mSerial, channel); simProxy.iccCloseLogicalChannel(rr.mSerial, channel, isEs10); } catch (RemoteException | RuntimeException e) { handleRadioProxyExceptionForRR(HAL_SERVICE_SIM, "iccCloseLogicalChannel", e); } Loading
src/java/com/android/internal/telephony/RadioSimProxy.java +15 −2 Original line number Diff line number Diff line Loading @@ -272,14 +272,27 @@ public class RadioSimProxy extends RadioServiceProxy { } /** * Call IRadioSim#iccCloseLogicalChannel * Call IRadioSim#iccCloseLogicalChannelWithSessionInfo * @param serial Serial number of request * @param channelId Channel ID of the channel to be closed * @param isEs10 Whether the logical channel is opened for performing ES10 operations. * @throws RemoteException */ public void iccCloseLogicalChannel(int serial, int channelId) throws RemoteException { public void iccCloseLogicalChannel(int serial, int channelId, boolean isEs10) throws RemoteException { if (isEmpty()) return; if (isAidl()) { if (mHalVersion.greaterOrEqual(RIL.RADIO_HAL_VERSION_2_1)) { // TODO: [MEP-A1] Use iccCloseLogicalChannelWithSessionInfo API once vendor // changes are completed. //android.hardware.radio.sim.SessionInfo info = // new android.hardware.radio.sim.SessionInfo(); //info.sessionId = channelId; //info.isEs10 = isEs10; //mSimProxy.iccCloseLogicalChannelWithSessionInfo(serial, info); mSimProxy.iccCloseLogicalChannel(serial, channelId); return; } mSimProxy.iccCloseLogicalChannel(serial, channelId); } else { mRadioProxy.iccCloseLogicalChannel(serial, channelId); Loading
src/java/com/android/internal/telephony/imsphone/ImsPhoneCommandInterface.java +3 −0 Original line number Diff line number Diff line Loading @@ -609,6 +609,9 @@ class ImsPhoneCommandInterface extends BaseCommands implements CommandsInterface @Override public void iccCloseLogicalChannel(int channel, Message response) {} @Override public void iccCloseLogicalChannel(int channel, boolean isEs10, Message response) {} @Override public void iccTransmitApduLogicalChannel(int channel, int cla, int instruction, int p1, int p2, int p3, String data, Loading
src/java/com/android/internal/telephony/uicc/euicc/apdu/CloseLogicalChannelInvocation.java +4 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,10 @@ class CloseLogicalChannelInvocation extends AsyncMessageInvocation<Integer, Bool @Override protected void sendRequestMessage(Integer channel, Message msg) { Rlog.v(LOG_TAG, "Channel: " + channel); mCi.iccCloseLogicalChannel(channel, msg); // TODO: Currently CloseLogicalChannelInvocation is used from ApduSender for closing the // channel opened on ISD-R. Hence passing isEs10 as true by default. // Should modify the logic in future if the ApduSender is used with non ISD-R AID. mCi.iccCloseLogicalChannel(channel, true /*isEs10*/, msg); } @Override Loading