summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-05-08 15:05:10 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-05-08 15:05:10 -0700
commit70a41561e8652de0fab5a0a721a173f44a67b083 (patch)
treeb464c9513a1073406bccf7670f7748b18e153751
parent05bceff9d8e522ba1e7e8c9b588b38549675364a (diff)
parentf744f53ed980ba901b458b070a1b5eb4526b69f3 (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.java4
-rw-r--r--src/com/android/dialer/dialpad/UnicodeDialerKeyListener.java3
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);