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

Commit ecc42ebc authored by Zongheng Wang's avatar Zongheng Wang Committed by Gerrit Code Review
Browse files

Merge "Use the new SystemAPI createFromNativeSmsSubmitPdu"

parents 5d59772d ee9f0092
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 */