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

Commit f246c42b authored by takuo's avatar takuo Committed by Steve Kondik
Browse files

Parse custom text header and ignore it.

Some MMS carrier append own custom header as text into PduData. We should parse it and ignore it at the moment.

Change-Id: I4d6cf20f5cf99172ebbe310ab18101316eb04c77
parent dbb8e7a7
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -200,7 +200,18 @@ public class PduParser {
        PduHeaders headers = new PduHeaders();

        while (keepParsing && (pduDataStream.available() > 0)) {
            pduDataStream.mark(1);
            int headerField = extractByteValue(pduDataStream);
            /* parse custom text header */
            if ((headerField >= TEXT_MIN) && (headerField <= TEXT_MAX)) {
                pduDataStream.reset();
                byte [] bVal = parseWapString(pduDataStream, TYPE_TEXT_STRING);
                if (LOCAL_LOGV) {
                    Log.v(LOG_TAG, "TextHeader: " + new String(bVal));
                }
                /* we should ignore it at the moment */
                continue;
            }
            switch (headerField) {
                case PduHeaders.MESSAGE_TYPE:
                {