diff options
author | emancebo <emancebo@cyngn.com> | 2015-08-04 18:47:40 -0700 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-10-18 14:23:08 -0700 |
commit | a72f2031be78e0910394b9a7bbaaa2fd6cad7a17 (patch) | |
tree | 516a531d1cf8266ec3a64013186b1e0b3c5577a7 | |
parent | 602ba5f29f3688fc0dafae1d737d4beff4a78ffc (diff) | |
download | android_frameworks_opt_chips-a72f2031be78e0910394b9a7bbaaa2fd6cad7a17.tar.gz android_frameworks_opt_chips-a72f2031be78e0910394b9a7bbaaa2fd6cad7a17.tar.bz2 android_frameworks_opt_chips-a72f2031be78e0910394b9a7bbaaa2fd6cad7a17.zip |
chips: extend phone number regex to recognize russian trunk prefix
Recognizes numbers of the format 8 (926) 123 45 67
issue-id: CYNGNOS-693
Change-Id: I524f4f4d0305a6d7a53255b63689704dac7d8bdb
-rw-r--r-- | src/com/android/ex/chips/RecipientEditTextView.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/android/ex/chips/RecipientEditTextView.java b/src/com/android/ex/chips/RecipientEditTextView.java index fcab7a9..a77e76d 100644 --- a/src/com/android/ex/chips/RecipientEditTextView.java +++ b/src/com/android/ex/chips/RecipientEditTextView.java @@ -126,12 +126,12 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements private static final String SEPARATOR = String.valueOf(COMMIT_CHAR_COMMA) + String.valueOf(COMMIT_CHAR_SPACE); - // This pattern comes from android.util.Patterns. It has been tweaked to handle a "1" before - // parens, so numbers such as "1 (425) 222-2342" match. + // This pattern comes from android.util.Patterns. It has been tweaked to handle a "1" or "8" + // before parens, so numbers such as "1 (425) 222-2342" match. private static final Pattern PHONE_PATTERN = Pattern.compile( // sdd = space, dot, or dash "(\\+[0-9]+[\\- \\.]*)?" // +<digits><sdd>* - + "(1?[ ]*\\([0-9]+\\)[\\- \\.]*)?" // 1(<digits>)<sdd>* + + "([18]?[ ]*\\([0-9]+\\)[\\- \\.]*)?" // (1|8)(<digits>)<sdd>* + "([0-9][0-9\\- \\.][0-9\\- \\.]+[0-9])"); // <digit><digit|sdd>+<digit> private static final int DISMISS = "dismiss".hashCode(); |