DO NOT MERGE. Check for null chip text.
Fixes bug:5324605 java.lang.NullPointerException at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:420)
Change-Id: If84a447d1209c5802298f5e886b4580fd3112248
diff --git a/src/com/android/ex/chips/RecipientEditTextView.java b/src/com/android/ex/chips/RecipientEditTextView.java
index 692ce30..6e14e89 100644
--- a/src/com/android/ex/chips/RecipientEditTextView.java
+++ b/src/com/android/ex/chips/RecipientEditTextView.java
@@ -903,7 +903,9 @@
if (entry != null) {
QwertyKeyListener.markAsReplaced(editable, start, end, "");
CharSequence chipText = createChip(entry, false);
- editable.replace(start, end, chipText);
+ if (chipText != null) {
+ editable.replace(start, end, chipText);
+ }
}
dismissDropDown();
return true;