diff options
author | linus_lee <llee@cyngn.com> | 2015-01-28 11:21:23 -0800 |
---|---|---|
committer | Linus Lee <llee@cyngn.com> | 2015-01-28 19:24:52 +0000 |
commit | 9677961ed1d8c2362890a83d30c53f5eb754031e (patch) | |
tree | cb750ced6a5e1f6e9b1fd2e4865003d501bd1d34 | |
parent | 49d58be28e44edc33a6bb2aaab1319c3fc944f88 (diff) | |
download | android_frameworks_opt_chips-9677961ed1d8c2362890a83d30c53f5eb754031e.tar.gz android_frameworks_opt_chips-9677961ed1d8c2362890a83d30c53f5eb754031e.tar.bz2 android_frameworks_opt_chips-9677961ed1d8c2362890a83d30c53f5eb754031e.zip |
Chips: Add more logic to dismiss selection dialogstable/cm-12.0-YNG1I
Check for address popup in addition to alternates with dismissing
On shrink, dismiss phone generated contact chips
Change-Id: I0e8b467e3faad15c0e7c46a03c8d8e4af8c3963e
-rw-r--r-- | src/com/android/ex/chips/RecipientEditTextView.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/ex/chips/RecipientEditTextView.java b/src/com/android/ex/chips/RecipientEditTextView.java index 8d06516..e1dedf6 100644 --- a/src/com/android/ex/chips/RecipientEditTextView.java +++ b/src/com/android/ex/chips/RecipientEditTextView.java @@ -526,8 +526,7 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements return; } long contactId = mSelectedChip != null ? mSelectedChip.getEntry().getContactId() : -1; - if (mSelectedChip != null && contactId != RecipientEntry.INVALID_CONTACT - && (!isPhoneQuery() && contactId != RecipientEntry.GENERATED_CONTACT)) { + if (mSelectedChip != null && contactId != RecipientEntry.INVALID_CONTACT) { clearSelectedChip(); } else { if (getWidth() <= 0) { @@ -2268,6 +2267,9 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements } setCursorVisible(true); setSelection(editable.length()); + if (mAddressPopup != null && mAddressPopup.isShowing()) { + mAddressPopup.dismiss(); + } if (mAlternatesPopup != null && mAlternatesPopup.isShowing()) { mAlternatesPopup.dismiss(); } |