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

Commit 6fe2a8a4 authored by Wink Saville's avatar Wink Saville Committed by android code review
Browse files

Merge "Handle the case when TP-PI reserved bits are set"

parents 5b7a88ea 56c949de
Loading
Loading
Loading
Loading
+16 −12
Original line number Diff line number Diff line
@@ -966,6 +966,9 @@ public class SmsMessage extends SmsMessageBase {
                // additional TP-PI octets.
                moreExtraParams = p.getByte();
            }
            // As per 3GPP 23.040 section 9.2.3.27 TP-Parameter-Indicator,
            // only process the byte if the reserved bits (bits3 to 6) are zero.
            if ((extraParams & 0x78) == 0) {
                // TP-Protocol-Identifier
                if ((extraParams & 0x01) != 0) {
                    protocolIdentifier = p.getByte();
@@ -981,6 +984,7 @@ public class SmsMessage extends SmsMessageBase {
                }
            }
        }
    }

    private void parseSmsDeliver(PduParser p, int firstByte) {
        replyPathPresent = (firstByte & 0x80) == 0x80;