[Crespo-S] Message not able to be sent to a Korean number with a plus code in front (i.e. +82...)

Bug 5800721

Remove separators from numbers before passing them to the SmsManager.
For numbers like "+8211-111-1111", Sprint will send back an SMS saying
the destination is invalid. By removing the separators ("-"), the number
sends fine.

Change-Id: I890a5c25063288e0527a468b65bcc26b00b57892
diff --git a/src/com/android/mms/transaction/SmsSingleRecipientSender.java b/src/com/android/mms/transaction/SmsSingleRecipientSender.java
index 40866d8..286cffc 100644
--- a/src/com/android/mms/transaction/SmsSingleRecipientSender.java
+++ b/src/com/android/mms/transaction/SmsSingleRecipientSender.java
@@ -7,6 +7,7 @@
 import android.content.Intent;
 import android.net.Uri;
 import android.provider.Telephony.Mms;
+import android.telephony.PhoneNumberUtils;
 import android.telephony.SmsManager;
 import android.util.Log;
 
@@ -52,8 +53,10 @@
             messages = smsManager.divideMessage(msgText);
         } else {
             messages = smsManager.divideMessage(mMessageText);
-            // remove spaces from destination number (e.g. "801 555 1212" -> "8015551212")
-            mDest = mDest.replaceAll(" ", "");
+            // remove spaces and dashes from destination number
+            // (e.g. "801 555 1212" -> "8015551212")
+            // (e.g. "+8211-123-4567" -> "+82111234567")
+            mDest = PhoneNumberUtils.stripSeparators(mDest);
             mDest = Conversation.verifySingleRecipient(mContext, mThreadId, mDest);
         }
         int messageCount = messages.size();