use of android.hardware.radio.V1_0.SmsWriteArgs in project android_frameworks_opt_telephony by LineageOS.
the class RILTest method testWriteSmsToSim.
@FlakyTest
@Test
public void testWriteSmsToSim() throws Exception {
String smscPdu = "smscPdu";
String pdu = "pdu";
int status = SmsManager.STATUS_ON_ICC_READ;
SmsWriteArgs args = new SmsWriteArgs();
args.status = 1;
args.smsc = smscPdu;
args.pdu = pdu;
mRILUnderTest.writeSmsToSim(status, smscPdu, pdu, obtainMessage());
verify(mRadioProxy).writeSmsToSim(mSerialNumberCaptor.capture(), eq(args));
verifyRILResponse(mRILUnderTest, mSerialNumberCaptor.getValue(), RIL_REQUEST_WRITE_SMS_TO_SIM);
}
use of android.hardware.radio.V1_0.SmsWriteArgs in project android_frameworks_opt_telephony by LineageOS.
the class RIL method writeSmsToSim.
@Override
public void writeSmsToSim(int status, String smsc, String pdu, Message result) {
status = translateStatus(status);
IRadio radioProxy = getRadioProxy(result);
if (radioProxy != null) {
RILRequest rr = obtainRequest(RIL_REQUEST_WRITE_SMS_TO_SIM, result, mRILDefaultWorkSource);
if (RILJ_LOGV) {
riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " " + status);
}
SmsWriteArgs args = new SmsWriteArgs();
args.status = status;
args.smsc = convertNullToEmptyString(smsc);
args.pdu = convertNullToEmptyString(pdu);
try {
radioProxy.writeSmsToSim(rr.mSerial, args);
} catch (RemoteException | RuntimeException e) {
handleRadioProxyExceptionForRR(rr, "writeSmsToSim", e);
}
}
}
Aggregations