summaryrefslogtreecommitdiffstats
path: root/chips/src
diff options
context:
space:
mode:
authorMindy Pereira <mindyp@google.com>2012-01-10 13:20:17 -0800
committerMindy Pereira <mindyp@google.com>2012-01-10 14:00:47 -0800
commita8065d50c1a9561375661d5eb32db2fd23750bc9 (patch)
tree3c4ea508ed38c33488f294112221430308d0e8ae /chips/src
parentdbbedc12e99acc1d006d819a9b539fd0f9ad044d (diff)
downloadandroid_frameworks_ex-a8065d50c1a9561375661d5eb32db2fd23750bc9.tar.gz
android_frameworks_ex-a8065d50c1a9561375661d5eb32db2fd23750bc9.tar.bz2
android_frameworks_ex-a8065d50c1a9561375661d5eb32db2fd23750bc9.zip
DO NOT MERGE. Dont sanitize before/ after/ between chips while waiting to create pending chips.
fixes b/5848985 if you try to add a new recipient before other chips have resolved, the existing recipients get erased Change-Id: Ic1bdb5f6632158e19d38c35ffc527dabbf55dd36
Diffstat (limited to 'chips/src')
-rw-r--r--chips/src/com/android/ex/chips/RecipientEditTextView.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/chips/src/com/android/ex/chips/RecipientEditTextView.java b/chips/src/com/android/ex/chips/RecipientEditTextView.java
index 1149641..650e107 100644
--- a/chips/src/com/android/ex/chips/RecipientEditTextView.java
+++ b/chips/src/com/android/ex/chips/RecipientEditTextView.java
@@ -760,6 +760,10 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements
*/
// Visible for testing.
/*package*/ void sanitizeEnd() {
+ // Don't sanitize while we are waiting for pending chips to complete.
+ if (mPendingChipsCount > 0) {
+ return;
+ }
// Find the last chip; eliminate any commit characters after it.
RecipientChip[] chips = getSortedRecipients();
if (chips != null && chips.length > 0) {
@@ -1047,6 +1051,10 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements
// Visible for testing.
/* package */ void sanitizeBetween() {
+ // Don't sanitize while we are waiting for content to chipify.
+ if (mPendingChipsCount > 0) {
+ return;
+ }
// Find the last chip.
RecipientChip[] recips = getSortedRecipients();
if (recips != null && recips.length > 0) {