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

Commit da162c32 authored by Chaitanya Saggurthi's avatar Chaitanya Saggurthi Committed by Linux Build Service Account
Browse files

Telephony: Add + for international number for CDMA MT SMS

Add + if international number is not having + at starting.

Change-Id: I2b3d6ac6b39aea6ecc87387a9de022082784ca0d
parent 9cac4e83
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -171,7 +171,16 @@ public class SmsMessage extends SmsMessageBase {
        }

        addr.origBytes = data;

        // Add + for international numbers if + is not existing
        if (addr.ton == addr.TON_INTERNATIONAL_OR_IP) {
            if (data[0] != '+') {
                addr.numberOfDigits ++;
                byte[] tmpData = new byte[addr.numberOfDigits];
                tmpData[0] = '+';
                System.arraycopy(data, 0, tmpData, 1, count);
                addr.origBytes = tmpData;
            }
        }
        subaddr.type = p.readInt(); // p_cur->sSubAddress.subaddressType
        subaddr.odd = p.readByte();     // p_cur->sSubAddress.odd
        count = p.readByte();           // p_cur->sSubAddress.number_of_digits