Search in sources :

Example 6 with GsmSmsMessage

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

the class RIL method constructGsmSendSmsRilRequest.

private GsmSmsMessage constructGsmSendSmsRilRequest(String smscPdu, String pdu) {
    GsmSmsMessage msg = new GsmSmsMessage();
    msg.smscPdu = smscPdu == null ? "" : smscPdu;
    msg.pdu = pdu == null ? "" : pdu;
    return msg;
}
Also used : GsmSmsMessage(android.hardware.radio.V1_0.GsmSmsMessage)

Example 7 with GsmSmsMessage

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

the class RIL method sendImsGsmSms.

@Override
public void sendImsGsmSms(String smscPdu, String pdu, int retry, int messageRef, Message result) {
    IRadio radioProxy = getRadioProxy(result);
    if (radioProxy != null) {
        RILRequest rr = obtainRequest(RIL_REQUEST_IMS_SEND_SMS, result, mRILDefaultWorkSource);
        // Do not log function args for privacy
        if (RILJ_LOGD)
            riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));
        ImsSmsMessage msg = new ImsSmsMessage();
        msg.tech = RILConstants.GSM_PHONE;
        msg.retry = (byte) retry >= 1 ? true : false;
        msg.messageRef = messageRef;
        GsmSmsMessage gsmMsg = constructGsmSendSmsRilRequest(smscPdu, pdu);
        msg.gsmMessage.add(gsmMsg);
        try {
            radioProxy.sendImsSms(rr.mSerial, msg);
            mMetrics.writeRilSendSms(mPhoneId, rr.mSerial, SmsSession.Event.Tech.SMS_IMS, SmsSession.Event.Format.SMS_FORMAT_3GPP);
        } catch (RemoteException | RuntimeException e) {
            handleRadioProxyExceptionForRR(rr, "sendImsGsmSms", e);
        }
    }
}
Also used : IRadio(android.hardware.radio.V1_0.IRadio) ImsSmsMessage(android.hardware.radio.V1_0.ImsSmsMessage) RemoteException(android.os.RemoteException) GsmSmsMessage(android.hardware.radio.V1_0.GsmSmsMessage)

Aggregations

GsmSmsMessage (android.hardware.radio.V1_0.GsmSmsMessage)7 IRadio (android.hardware.radio.V1_0.IRadio)3 RemoteException (android.os.RemoteException)3 FlakyTest (androidx.test.filters.FlakyTest)3 Test (org.junit.Test)3 ImsSmsMessage (android.hardware.radio.V1_0.ImsSmsMessage)2