Remove space handling for now.
This needs to be run only on NEWLY added recipients, notappended ones.
Change-Id: I2754528ae660928d75b6a1e097976a151995944d
diff --git a/src/com/android/ex/chips/RecipientEditTextView.java b/src/com/android/ex/chips/RecipientEditTextView.java
index 66cdabd..dd2b3b2 100644
--- a/src/com/android/ex/chips/RecipientEditTextView.java
+++ b/src/com/android/ex/chips/RecipientEditTextView.java
@@ -122,7 +122,8 @@
private static final char COMMIT_CHAR_SEMICOLON = ';';
- private static final char COMMIT_CHAR_SPACE = ' ';
+ // TODO: do not run on appeneded recipients.
+ //private static final char COMMIT_CHAR_SPACE = ' ';
private ListPopupWindow mAlternatesPopup;
@@ -175,7 +176,10 @@
char last = s.charAt(length() - 1);
if (last == COMMIT_CHAR_SEMICOLON || last == COMMIT_CHAR_COMMA) {
commitDefault();
- } else if (last == COMMIT_CHAR_SPACE) {
+ }
+ // TODO: make sure this only runs AFTER appended recipients
+ // are handled.
+ /*else if (last == COMMIT_CHAR_SPACE) {
// Check if this is a valid email address. If it is, commit it.
String text = getText().toString();
int tokenStart = mTokenizer.findTokenStart(text, start);
@@ -183,7 +187,7 @@
if (mValidator != null && mValidator.isValid(sub)) {
commitDefault();
}
- }
+ }*/
}
}
@@ -652,10 +656,12 @@
if (commitCharPosition != -1) {
text = text.substring(0, commitCharPosition);
}
- commitCharPosition = text.indexOf(COMMIT_CHAR_SPACE);
+ // TODO: make sure this only runs AFTER appended recipients
+ // are handled.
+ /*commitCharPosition = text.indexOf(COMMIT_CHAR_SPACE);
if (commitCharPosition != -1 && commitCharPosition != 0) {
text = text.substring(0, commitCharPosition);
- }
+ }*/
return text;
}