From a423a279f6297bb9422fc8841651348c2fcc7b7a Mon Sep 17 00:00:00 2001 From: "sohryun.shin" Date: Mon, 12 Jan 2015 13:42:59 +0900 Subject: [PATCH] Add + code handling logic for SMS Global Roaming When sending SMS from international CDMA NANP country, outgoing SMS is failed due to + code converting. (Send a SMS text message: to an international phone number using the plus code (+)). In kitkat, when user send a sms with plus code, the "+" converted to 011(NANP_IDP_STRING). And it works well. However, in lollipop, the "+" converted to current IDP, not NANP_IDP_STRING. And it failed to send the SMS. I think, we need to seperate SMS and Call logic like cdmaCheckAndProcessPlusCodeForSms and cdmaCheckAndProcessPlusCode. sohryun.shin@lge.com Change-Id: Ie9d402cbeb4de4ac30299d5820b33909d0e40320 --- telephony/java/android/telephony/PhoneNumberUtils.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/telephony/java/android/telephony/PhoneNumberUtils.java b/telephony/java/android/telephony/PhoneNumberUtils.java index 30799f88bc9ba..86015fc98e113 100644 --- a/telephony/java/android/telephony/PhoneNumberUtils.java +++ b/telephony/java/android/telephony/PhoneNumberUtils.java @@ -2285,9 +2285,13 @@ public class PhoneNumberUtils } private static String getCurrentIdp(boolean useNanp) { - // in case, there is no IDD is found, we shouldn't convert it. - String ps = SystemProperties.get( - PROPERTY_OPERATOR_IDP_STRING, useNanp ? NANP_IDP_STRING : PLUS_SIGN_STRING); + String ps = null; + if(useNanp) + ps = NANP_IDP_STRING; + else{ + // in case, there is no IDD is found, we shouldn't convert it. + ps = SystemProperties.get(PROPERTY_OPERATOR_IDP_STRING, PLUS_SIGN_STRING); + } return ps; }