From 4e4ad34159dc1c720a3e6145bb9f14c60fb1a3f7 Mon Sep 17 00:00:00 2001 From: Soojung Shin Date: Sat, 14 May 2011 01:23:31 +0900 Subject: [PATCH] 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 --- .../com/android/internal/telephony/cdma/SmsMessage.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java b/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java index 6f024ed9c3964..a1f20f87e5c19 100755 --- a/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java +++ b/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java @@ -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();