Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb162c94 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Use createFromPdu() in common" am: d55f4647 am: 53cad68e

Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/1359243

Change-Id: Ie5ea7ab1c884296dceb3794539a5936cb6b7c212
parents 58e652a8 53cad68e
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -166,9 +166,10 @@ public class RadioIndication extends IRadioIndication.Stub {
        byte[] pduArray = RIL.arrayListToPrimitiveArray(pdu);
        if (RIL.RILJ_LOGD) mRil.unsljLog(RIL_UNSOL_RESPONSE_NEW_SMS);

        SmsMessage sms = SmsMessage.newFromCMT(pduArray);
        SmsMessageBase smsb = com.android.internal.telephony.gsm.SmsMessage.createFromPdu(pduArray);
        if (mRil.mGsmSmsRegistrant != null) {
            mRil.mGsmSmsRegistrant.notifyRegistrant(new AsyncResult(null, sms, null));
            mRil.mGsmSmsRegistrant.notifyRegistrant(
                    new AsyncResult(null, smsb == null ? null : new SmsMessage(smsb), null));
        }
    }

+1 −1
Original line number Diff line number Diff line
@@ -833,7 +833,7 @@ public class SmsDispatchersController extends Handler {
    private Pair<Boolean, Boolean> handleGsmStatusReport(SMSDispatcher.SmsTracker tracker,
            String format, byte[] pdu) {
        com.android.internal.telephony.gsm.SmsMessage sms =
                com.android.internal.telephony.gsm.SmsMessage.newFromCDS(pdu);
                com.android.internal.telephony.gsm.SmsMessage.createFromPdu(pdu);
        boolean complete = false;
        boolean success = false;
        if (sms != null) {
+5 −5
Original line number Diff line number Diff line
@@ -132,15 +132,15 @@ public final class GsmSMSDispatcher extends SMSDispatcher {
    }

    /**
     * Called when a status report is received.  This should correspond to
     * a previously successful SEND.
     * Called when a status report is received. This should correspond to a previously successful
     * SEND.
     *
     * @param ar AsyncResult passed into the message handler.  ar.result should
     *           be a String representing the status report PDU, as ASCII hex.
     * @param ar AsyncResult passed into the message handler. ar.result should be a byte array for
     *           the status report PDU.
     */
    private void handleStatusReport(AsyncResult ar) {
        byte[] pdu = (byte[]) ar.result;
        SmsMessage sms = SmsMessage.newFromCDS(pdu);
        SmsMessage sms = SmsMessage.createFromPdu(pdu);
        boolean handled = false;

        if (sms != null) {
+0 −1
Original line number Diff line number Diff line
@@ -31,6 +31,5 @@ public class SmsMessageTest {
        assertEquals(null, SmsMessage.createFromPdu(null, SmsConstants.FORMAT_3GPP2));
        assertEquals(null, SmsMessage.createFromPdu(null, SmsConstants.FORMAT_3GPP));
        assertEquals(null, SmsMessage.createFromPdu(null));
        assertEquals(null, SmsMessage.newFromCMT(null));
    }
}