diff options
| author | Mindy Pereira <mindyp@google.com> | 2012-06-04 15:24:55 -0700 |
|---|---|---|
| committer | Mindy Pereira <mindyp@google.com> | 2012-06-04 15:24:55 -0700 |
| commit | 87a5af3ed31a18c66aa62154e66e3d841dc02a27 (patch) | |
| tree | 7f6af77805171bfc21cd19ba32c162125a4c135b | |
| parent | 8c2158e5d5e87080f545e8bc1070f925c15f5466 (diff) | |
| download | android_frameworks_ex-87a5af3ed31a18c66aa62154e66e3d841dc02a27.tar.gz android_frameworks_ex-87a5af3ed31a18c66aa62154e66e3d841dc02a27.tar.bz2 android_frameworks_ex-87a5af3ed31a18c66aa62154e66e3d841dc02a27.zip | |
Break out of infinite loop once we detect an error.
Fixes b/6606808 Crash in Gmail {OutOfMemoryError- at android.graphics.Bitmap.nativeCreate(Native Method) }
Change-Id: Ic62c15bd59060f552aef5be0cc06e26b56efd462
| -rw-r--r-- | chips/src/com/android/ex/chips/RecipientEditTextView.java | 3 |
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 dc67901..bdc1a58 100644 --- a/chips/src/com/android/ex/chips/RecipientEditTextView.java +++ b/chips/src/com/android/ex/chips/RecipientEditTextView.java @@ -2225,6 +2225,9 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements tokenEnd = movePastTerminators(mTokenizer.findTokenEnd(text, tokenStart)); commitChip(tokenStart, tokenEnd, getText()); createdChip = findChip(tokenStart); + if (createdChip == null) { + break; + } // +1 for the space at the end. tokenStart = getSpannable().getSpanEnd(createdChip) + 1; created.add(createdChip); |
