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

Commit 363130eb authored by Zongheng Wang's avatar Zongheng Wang
Browse files

Use the new SystemAPI createFromNativeSmsSubmitPdu

Bug: 140562205
Test: Compile
Change-Id: Iaaa43d1ffb597d9bb1f6a877a28e8ece9ec536d7
parent 1f436377
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 */