summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Kennedy <skennedy@android.com>2013-03-14 18:17:16 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2013-03-14 18:17:16 +0000
commit8682651d24b0c2cb733b4ef58982aa05f247b3d6 (patch)
treea00952df1d0deba1da1f4ff55a5c2c651e13c56a
parent9f662b7d0561a46a0250702385084c48efe9ca24 (diff)
parent05a1a8479839a7feb3e765c0ce5223b7a20826ce (diff)
downloadandroid_frameworks_ex-8682651d24b0c2cb733b4ef58982aa05f247b3d6.tar.gz
android_frameworks_ex-8682651d24b0c2cb733b4ef58982aa05f247b3d6.tar.bz2
android_frameworks_ex-8682651d24b0c2cb733b4ef58982aa05f247b3d6.zip
Merge "Fix a Dead Loop issue in RecipientEditTextView"
-rw-r--r--chips/src/com/android/ex/chips/RecipientEditTextView.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/chips/src/com/android/ex/chips/RecipientEditTextView.java b/chips/src/com/android/ex/chips/RecipientEditTextView.java
index 93ca4e8..925e5ce 100644
--- a/chips/src/com/android/ex/chips/RecipientEditTextView.java
+++ b/chips/src/com/android/ex/chips/RecipientEditTextView.java
@@ -2323,12 +2323,12 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements
int originalTokenStart = mTokenizer.findTokenStart(text, getSelectionEnd());
String lastAddress = text.substring(originalTokenStart);
int tokenStart = originalTokenStart;
- int prevTokenStart = tokenStart;
+ int prevTokenStart = 0;
RecipientChip findChip = null;
ArrayList<RecipientChip> created = new ArrayList<RecipientChip>();
if (tokenStart != 0) {
// There are things before this!
- while (tokenStart != 0 && findChip == null) {
+ while (tokenStart != 0 && findChip == null && tokenStart != prevTokenStart) {
prevTokenStart = tokenStart;
tokenStart = mTokenizer.findTokenStart(text, tokenStart);
findChip = findChip(tokenStart);