diff options
author | Soojung Shin <sj46.shin@samsung.com> | 2011-05-14 01:23:31 +0900 |
---|---|---|
committer | Simon Wilson <simonwilson@google.com> | 2011-05-23 15:02:32 -0700 |
commit | 4e4ad34159dc1c720a3e6145bb9f14c60fb1a3f7 (patch) | |
tree | d97ff2a7839818c7489c5242080105f703b89547 /telephony/java | |
parent | 6f0394a3b4d6082c9cb01de4a220a3b082e1840a (diff) | |
download | frameworks_base-4e4ad34159dc1c720a3e6145bb9f14c60fb1a3f7.zip frameworks_base-4e4ad34159dc1c720a3e6145bb9f14c60fb1a3f7.tar.gz frameworks_base-4e4ad34159dc1c720a3e6145bb9f14c60fb1a3f7.tar.bz2 |
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>
Diffstat (limited to 'telephony/java')
-rwxr-xr-x | telephony/java/com/android/internal/telephony/cdma/SmsMessage.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java b/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java index 6f024ed..a1f20f8 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(); |