use of android.hardware.radio.V1_0.SimApdu in project android_frameworks_opt_telephony by LineageOS.
the class RIL method iccTransmitApduBasicChannel.
@Override
public void iccTransmitApduBasicChannel(int cla, int instruction, int p1, int p2, int p3, String data, Message result) {
IRadio radioProxy = getRadioProxy(result);
if (radioProxy != null) {
RILRequest rr = obtainRequest(RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC, result, mRILDefaultWorkSource);
if (RILJ_LOGD) {
if (TelephonyUtils.IS_DEBUGGABLE) {
riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + String.format(" cla = 0x%02X ins = 0x%02X", cla, instruction) + String.format(" p1 = 0x%02X p2 = 0x%02X p3 = 0x%02X", p1, p2, p3) + " data = " + data);
} else {
riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));
}
}
SimApdu msg = createSimApdu(0, cla, instruction, p1, p2, p3, data);
try {
radioProxy.iccTransmitApduBasicChannel(rr.mSerial, msg);
} catch (RemoteException | RuntimeException e) {
handleRadioProxyExceptionForRR(rr, "iccTransmitApduBasicChannel", e);
}
}
}
use of android.hardware.radio.V1_0.SimApdu in project android_frameworks_opt_telephony by LineageOS.
the class RIL method createSimApdu.
private SimApdu createSimApdu(int channel, int cla, int instruction, int p1, int p2, int p3, String data) {
SimApdu msg = new SimApdu();
msg.sessionId = channel;
msg.cla = cla;
msg.instruction = instruction;
msg.p1 = p1;
msg.p2 = p2;
msg.p3 = p3;
msg.data = convertNullToEmptyString(data);
return msg;
}
use of android.hardware.radio.V1_0.SimApdu in project android_frameworks_opt_telephony by LineageOS.
the class RIL method iccTransmitApduLogicalChannel.
@Override
public void iccTransmitApduLogicalChannel(int channel, int cla, int instruction, int p1, int p2, int p3, String data, Message result) {
if (channel <= 0) {
throw new RuntimeException("Invalid channel in iccTransmitApduLogicalChannel: " + channel);
}
IRadio radioProxy = getRadioProxy(result);
if (radioProxy != null) {
RILRequest rr = obtainRequest(RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL, result, mRILDefaultWorkSource);
if (RILJ_LOGD) {
if (TelephonyUtils.IS_DEBUGGABLE) {
riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + String.format(" channel = %d", channel) + String.format(" cla = 0x%02X ins = 0x%02X", cla, instruction) + String.format(" p1 = 0x%02X p2 = 0x%02X p3 = 0x%02X", p1, p2, p3) + " data = " + data);
} else {
riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));
}
}
SimApdu msg = createSimApdu(channel, cla, instruction, p1, p2, p3, data);
try {
radioProxy.iccTransmitApduLogicalChannel(rr.mSerial, msg);
} catch (RemoteException | RuntimeException e) {
handleRadioProxyExceptionForRR(rr, "iccTransmitApduLogicalChannel", e);
}
}
}
Aggregations