Search in sources :

Example 1 with CdmaSmsWriteArgs

use of android.hardware.radio.V1_0.CdmaSmsWriteArgs in project android_frameworks_opt_telephony by LineageOS.

the class RIL method writeSmsToRuim.

@Override
public void writeSmsToRuim(int status, String pdu, Message result) {
    status = translateStatus(status);
    IRadio radioProxy = getRadioProxy(result);
    if (radioProxy != null) {
        RILRequest rr = obtainRequest(RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM, result, mRILDefaultWorkSource);
        if (RILJ_LOGV) {
            riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " status = " + status);
        }
        CdmaSmsWriteArgs args = new CdmaSmsWriteArgs();
        args.status = status;
        constructCdmaSendSmsRilRequest(args.message, pdu.getBytes());
        try {
            radioProxy.writeSmsToRuim(rr.mSerial, args);
        } catch (RemoteException | RuntimeException e) {
            handleRadioProxyExceptionForRR(rr, "writeSmsToRuim", e);
        }
    }
}
Also used : IRadio(android.hardware.radio.V1_0.IRadio) CdmaSmsWriteArgs(android.hardware.radio.V1_0.CdmaSmsWriteArgs) RemoteException(android.os.RemoteException)

Example 2 with CdmaSmsWriteArgs

use of android.hardware.radio.V1_0.CdmaSmsWriteArgs in project android_frameworks_opt_telephony by LineageOS.

the class RIL method writeSmsToRuim.

@Override
public void writeSmsToRuim(int status, byte[] pdu, Message result) {
    status = translateStatus(status);
    IRadio radioProxy = getRadioProxy(result);
    if (radioProxy != null) {
        RILRequest rr = obtainRequest(RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM, result, mRILDefaultWorkSource);
        if (RILJ_LOGV) {
            riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " status = " + status);
        }
        CdmaSmsWriteArgs args = new CdmaSmsWriteArgs();
        args.status = status;
        constructCdmaSendSmsRilRequest(args.message, pdu);
        try {
            radioProxy.writeSmsToRuim(rr.mSerial, args);
        } catch (RemoteException | RuntimeException e) {
            handleRadioProxyExceptionForRR(rr, "writeSmsToRuim", e);
        }
    }
}
Also used : IRadio(android.hardware.radio.V1_0.IRadio) CdmaSmsWriteArgs(android.hardware.radio.V1_0.CdmaSmsWriteArgs) RemoteException(android.os.RemoteException)

Aggregations

CdmaSmsWriteArgs (android.hardware.radio.V1_0.CdmaSmsWriteArgs)2 IRadio (android.hardware.radio.V1_0.IRadio)2 RemoteException (android.os.RemoteException)2