summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Taylor <tomtaylor@google.com>2013-01-14 16:52:25 -0800
committerTom Taylor <tomtaylor@google.com>2013-01-14 16:52:25 -0800
commit64da517d8aad0fb63644a29ff8797fc9b46839c9 (patch)
treec7525c875947c0021e33b37c84ddf5ea491fedba
parent7cd3868f4d53989de1292998525402a819b3b450 (diff)
downloadandroid_frameworks_ex-64da517d8aad0fb63644a29ff8797fc9b46839c9.tar.gz
android_frameworks_ex-64da517d8aad0fb63644a29ff8797fc9b46839c9.tar.bz2
android_frameworks_ex-64da517d8aad0fb63644a29ff8797fc9b46839c9.zip
Repeatable ANR when pasting text into the recipient field
Bug 7998195 Add an escape clause to an infinite loop. The bug is 100% repro. Change-Id: If4d4409a992ce29176ac8ef544a71b3649c1e6ee
-rw-r--r--chips/src/com/android/ex/chips/RecipientEditTextView.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/chips/src/com/android/ex/chips/RecipientEditTextView.java b/chips/src/com/android/ex/chips/RecipientEditTextView.java
index 94b6062..4b1d53f 100644
--- a/chips/src/com/android/ex/chips/RecipientEditTextView.java
+++ b/chips/src/com/android/ex/chips/RecipientEditTextView.java
@@ -2344,6 +2344,9 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements
prevTokenStart = tokenStart;
tokenStart = mTokenizer.findTokenStart(text, tokenStart);
findChip = findChip(tokenStart);
+ if (tokenStart == originalTokenStart && findChip == null) {
+ break;
+ }
}
if (tokenStart != originalTokenStart) {
if (findChip != null) {