diff options
author | mindyp <mindyp@google.com> | 2012-11-07 08:58:06 -0800 |
---|---|---|
committer | mindyp <mindyp@google.com> | 2012-11-07 09:03:45 -0800 |
commit | dab17fcff4efe640287a8cce7f82bd305e2c1fcf (patch) | |
tree | 3d759414ade581ad2372bf5a5412adc1a513060b /chips/src | |
parent | d5f7739013e4e4e392bcfca04c0cf1ed07c04819 (diff) | |
download | android_frameworks_ex-dab17fcff4efe640287a8cce7f82bd305e2c1fcf.tar.gz android_frameworks_ex-dab17fcff4efe640287a8cce7f82bd305e2c1fcf.tar.bz2 android_frameworks_ex-dab17fcff4efe640287a8cce7f82bd305e2c1fcf.zip |
Make sure that the last "fake entry" chip is correctly committed
Fix logic to correctly determine that this "recipient chip" is really
text
Fixes part of b/7481045 recipient address briefly drawn w/o friendly name
Change-Id: I4c5244581a4fce5de58d6d9c510e1df16674c338
Diffstat (limited to 'chips/src')
-rw-r--r-- | chips/src/com/android/ex/chips/RecipientEditTextView.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chips/src/com/android/ex/chips/RecipientEditTextView.java b/chips/src/com/android/ex/chips/RecipientEditTextView.java index 215ab60..7a3c619 100644 --- a/chips/src/com/android/ex/chips/RecipientEditTextView.java +++ b/chips/src/com/android/ex/chips/RecipientEditTextView.java @@ -398,8 +398,9 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements if (mTokenizer == null) { return; } - if (mSelectedChip != null - && shouldShowEditableText(mSelectedChip)) { + long contactId = mSelectedChip != null ? mSelectedChip.getEntry().getContactId() : -1; + if (mSelectedChip != null && contactId != RecipientEntry.INVALID_CONTACT + && (!isPhoneQuery() && contactId != RecipientEntry.GENERATED_CONTACT)) { clearSelectedChip(); } else { if (getWidth() <= 0) { |