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>
This commit is contained in:
Soojung Shin
2011-05-14 01:23:31 +09:00
committed by Simon Wilson
parent 6f0394a3b4
commit 4e4ad34159

View File

@@ -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();