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

Commit d55f4647 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Use createFromPdu() in common"

parents 623383df bc4b4c35
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
@@ -827,7 +827,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));
    }
}