Use new PhoneNumberUtils method for CDMA MO SMS formatting.
Jake Hamby [Mon, 4 Nov 2013 23:26:01 +0000 (15:26 -0800)]
For CDMA networks, convert "+" prefix to "011" if the home network
is using the North American Numbering Plan (NANP). Previously the
roaming network numbering plan was also checked, but for MO SMS,
only the home network numbering plan is relevant.

Bug: 11360679
Change-Id: Ia54f00c0ff2012622003ed4003b7fb59451b0bea

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

index 626ff25..bb9f9d5 100644 (file)
@@ -158,7 +158,7 @@ public final class CdmaServiceCategoryProgramHandler extends WakeLockStateMachin
                 dos.writeInt(0); //servicePresent
                 dos.writeInt(0); //serviceCategory
                 CdmaSmsAddress destAddr = CdmaSmsAddress.parse(
-                        PhoneNumberUtils.cdmaCheckAndProcessPlusCode(sender));
+                        PhoneNumberUtils.cdmaCheckAndProcessPlusCodeForSms(sender));
                 dos.write(destAddr.digitMode);
                 dos.write(destAddr.numberMode);
                 dos.write(destAddr.ton); // number_type
index e36ac45..6f202c1 100644 (file)
@@ -851,7 +851,7 @@ public class SmsMessage extends SmsMessageBase {
          * Convert + code to 011 and dial out for international SMS
          */
         CdmaSmsAddress destAddr = CdmaSmsAddress.parse(
-                PhoneNumberUtils.cdmaCheckAndProcessPlusCode(destAddrStr));
+                PhoneNumberUtils.cdmaCheckAndProcessPlusCodeForSms(destAddrStr));
         if (destAddr == null) return null;
 
         BearerData bearerData = new BearerData();