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

Commit 7f304d2c authored by jsh's avatar jsh
Browse files

Fix for sending 16-bit SMS message with header.

Header length was missing from the PDU.  This addresses http://b/issue?id=2040561
parent eccd6fdd
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -277,10 +277,12 @@ public class SmsMessage extends SmsMessageBase{
            }

            if (header != null) {
                userData = new byte[header.length + textPart.length];
                // Need 1 byte for UDHL
                userData = new byte[header.length + textPart.length + 1];

                System.arraycopy(header, 0, userData, 0, header.length);
                System.arraycopy(textPart, 0, userData, header.length, textPart.length);
                userData[0] = (byte)header.length;
                System.arraycopy(header, 0, userData, 1, header.length);
                System.arraycopy(textPart, 0, userData, header.length + 1, textPart.length);
            }
            else {
                userData = textPart;