diff options
author | Yorke Lee <yorkelee@google.com> | 2013-05-08 15:05:10 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-05-08 15:05:10 -0700 |
commit | 70a41561e8652de0fab5a0a721a173f44a67b083 (patch) | |
tree | b464c9513a1073406bccf7670f7748b18e153751 | |
parent | 05bceff9d8e522ba1e7e8c9b588b38549675364a (diff) | |
parent | f744f53ed980ba901b458b070a1b5eb4526b69f3 (diff) |
am f744f53e: Allow vanity numbers via paste/DIAL intent
* commit 'f744f53ed980ba901b458b070a1b5eb4526b69f3':
Allow vanity numbers via paste/DIAL intent
-rw-r--r-- | src/com/android/dialer/dialpad/DialpadFragment.java | 4 | ||||
-rw-r--r-- | src/com/android/dialer/dialpad/UnicodeDialerKeyListener.java | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index 3693e6aa0..20148b705 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -395,7 +395,9 @@ public class DialpadFragment extends Fragment String data = uri.getSchemeSpecificPart(); // Remember it is filled via Intent. mDigitsFilledByIntent = true; - setFormattedDigits(data, null); + final String converted = PhoneNumberUtils.convertKeypadLettersToDigits( + PhoneNumberUtils.replaceUnicodeDigits(data)); + setFormattedDigits(converted, null); return true; } else { String type = intent.getType(); diff --git a/src/com/android/dialer/dialpad/UnicodeDialerKeyListener.java b/src/com/android/dialer/dialpad/UnicodeDialerKeyListener.java index c25c7a9dd..740b4566f 100644 --- a/src/com/android/dialer/dialpad/UnicodeDialerKeyListener.java +++ b/src/com/android/dialer/dialpad/UnicodeDialerKeyListener.java @@ -31,7 +31,8 @@ public class UnicodeDialerKeyListener extends DialerKeyListener { @Override public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) { - CharSequence converted = PhoneNumberUtils.replaceUnicodeDigits(source.toString()); + final String converted = PhoneNumberUtils.convertKeypadLettersToDigits( + PhoneNumberUtils.replaceUnicodeDigits(source.toString())); // PhoneNumberUtils.replaceUnicodeDigits performs a character for character replacement, // so we can assume that start and end positions should remain unchanged. CharSequence result = super.filter(converted, start, end, dest, dstart, dend); |