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

Commit 6d5781d8 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Use the new SystemAPI createFromNativeSmsSubmitPdu" am: 04938818 am: 2f947fe4

Change-Id: I38f43f3fadb439d9984c8771d474151d5ef7745c
parents 7611ede9 2f947fe4
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 */