Search in sources :

Example 1 with CdmaSmsAck

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

the class RIL method acknowledgeLastIncomingCdmaSms.

@Override
public void acknowledgeLastIncomingCdmaSms(boolean success, int cause, Message result) {
    IRadio radioProxy = getRadioProxy(result);
    if (radioProxy != null) {
        RILRequest rr = obtainRequest(RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE, result, mRILDefaultWorkSource);
        if (RILJ_LOGD) {
            riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " success = " + success + " cause = " + cause);
        }
        CdmaSmsAck msg = new CdmaSmsAck();
        msg.errorClass = success ? 0 : 1;
        msg.smsCauseCode = cause;
        try {
            radioProxy.acknowledgeLastIncomingCdmaSms(rr.mSerial, msg);
        } catch (RemoteException | RuntimeException e) {
            handleRadioProxyExceptionForRR(rr, "acknowledgeLastIncomingCdmaSms", e);
        }
    }
}
Also used : IRadio(android.hardware.radio.V1_0.IRadio) RemoteException(android.os.RemoteException) CdmaSmsAck(android.hardware.radio.V1_0.CdmaSmsAck)

Aggregations

CdmaSmsAck (android.hardware.radio.V1_0.CdmaSmsAck)1 IRadio (android.hardware.radio.V1_0.IRadio)1 RemoteException (android.os.RemoteException)1