Skip to content

Commit 4e4ad34

Browse files
Soojung ShinSimon Wilson
authored andcommitted
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: Soojung Shin <sj46.shin@samsung.com>
1 parent 6f0394a commit 4e4ad34

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

telephony/java/com/android/internal/telephony/cdma/SmsMessage.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import android.os.Parcel;
2020
import android.os.SystemProperties;
21+
import android.telephony.PhoneNumberUtils;
2122
import android.text.format.Time;
2223
import android.util.Config;
2324
import android.util.Log;
@@ -650,7 +651,12 @@ private static SubmitPdu privateGetSubmitPdu(String destAddrStr, boolean statusR
650651
* mechanism, and avoid null pointer exceptions.
651652
*/
652653

653-
CdmaSmsAddress destAddr = CdmaSmsAddress.parse(destAddrStr);
654+
/**
655+
* North America Plus Code :
656+
* Convert + code to 011 and dial out for international SMS
657+
*/
658+
CdmaSmsAddress destAddr = CdmaSmsAddress.parse(
659+
PhoneNumberUtils.cdmaCheckAndProcessPlusCode(destAddrStr));
654660
if (destAddr == null) return null;
655661

656662
BearerData bearerData = new BearerData();

0 commit comments

Comments
 (0)