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

Commit 2f947fe4 authored by Zongheng Wang's avatar Zongheng Wang Committed by android-build-merger
Browse files

Merge "Use the new SystemAPI createFromNativeSmsSubmitPdu"

am: 04938818

Change-Id: I8d2dd65afa213dad3371e1651a4380820cd87a46
parents 743bc69e 04938818
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -601,11 +601,13 @@ public class BluetoothMapSmsPdu {
     * The destination address must be extracted from the bmessage vCard(s).
     */
    public static String decodePdu(byte[] data, int type) {
        String ret;
        String ret = "";
        if (type == SMS_TYPE_CDMA) {
            /* This is able to handle both submit and deliver PDUs */
            ret = com.android.internal.telephony.cdma.SmsMessage.createFromEfRecord(0, data)
                    .getMessageBody();
            SmsMessage smsMessage = SmsMessage.createFromNativeSmsSubmitPdu(data, true);
            if (smsMessage != null) {
                ret = smsMessage.getMessageBody();
            }
        } else {
            /* For GSM, there is no submit pdu decoder, and most parser utils are private, and
            only minded for submit pdus */