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

Commit 4e4ad341 authored by Soojung Shin's avatar Soojung Shin Committed by Simon Wilson
Browse files

SmsMessage: convert + to international dialing prefix



When sending an SMS to an international number in the format
+401234567890, the "+" should be converted to the International
Dialing Prefix (in the US, 011). However, the device drops this
"+" altogether in the outbound data burst message causing the message
to fail or be sent to the wrong address.

Change-Id: If25c092d283f1703b49cf52d0379efa54639f093
Signed-off-by: default avatarSoojung Shin <sj46.shin@samsung.com>
parent 6f0394a3
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.internal.telephony.cdma;

import android.os.Parcel;
import android.os.SystemProperties;
import android.telephony.PhoneNumberUtils;
import android.text.format.Time;
import android.util.Config;
import android.util.Log;
@@ -650,7 +651,12 @@ public class SmsMessage extends SmsMessageBase {
         * mechanism, and avoid null pointer exceptions.
         */

        CdmaSmsAddress destAddr = CdmaSmsAddress.parse(destAddrStr);
        /**
         * North America Plus Code :
         * Convert + code to 011 and dial out for international SMS
         */
        CdmaSmsAddress destAddr = CdmaSmsAddress.parse(
                PhoneNumberUtils.cdmaCheckAndProcessPlusCode(destAddrStr));
        if (destAddr == null) return null;

        BearerData bearerData = new BearerData();