summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoremancebo <emancebo@cyngn.com>2015-08-04 18:47:40 -0700
committerMartin Brabham <mbrabham@cyngn.com>2015-10-06 14:55:01 -0700
commitc370a476acac4f7f190fdad958496efd978b5967 (patch)
treebf26c0012dc593d43a69c9f0c765203e7ec8eeae
parente7c81b038b2cd483ab419a2d449ab28628dcb7c6 (diff)
downloadandroid_frameworks_opt_chips-c370a476acac4f7f190fdad958496efd978b5967.tar.gz
android_frameworks_opt_chips-c370a476acac4f7f190fdad958496efd978b5967.tar.bz2
android_frameworks_opt_chips-c370a476acac4f7f190fdad958496efd978b5967.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 (cherry picked from commit 4d8a1227b49b2b268985b6be066f5d7e3bcb0fdc)
-rw-r--r--src/com/android/ex/chips/RecipientEditTextView.java6
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 a156305..0202cfa 100644
--- a/src/com/android/ex/chips/RecipientEditTextView.java
+++ b/src/com/android/ex/chips/RecipientEditTextView.java
@@ -122,12 +122,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();