diff options
| author | Romain Guy <romainguy@google.com> | 2012-02-15 18:34:37 -0800 |
|---|---|---|
| committer | Romain Guy <romainguy@google.com> | 2012-02-15 18:34:37 -0800 |
| commit | c27cc01f6abf8564dc9b7b6cd7f2a12a347f725d (patch) | |
| tree | 31b1c6044b0f79ed98f7d09b0ec5c038c734aa45 /core/java/android/widget/AutoCompleteTextView.java | |
| parent | fe455af277183f910eb74653a3ad172c717e7abf (diff) | |
Prevent AutoCompleteTextView from opening a popup when it shouldn't
Bug #5553515
The People app is forcing ACTV to show the IME which had the side effect
of showing the drop down popup. ACTV was unfortunately not ready to show
the drop down if the filtering resulted in no results. Doing so was putting
ACTV in a weird state that in turn caused a window to be leaked and really
bad behavior to occur in the lower graphics levels.
Change-Id: I2ff146d5ae4e4a28edf6ea17039c9f8fdb710e4f
Diffstat (limited to 'core/java/android/widget/AutoCompleteTextView.java')
| -rw-r--r-- | core/java/android/widget/AutoCompleteTextView.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java index f7a6b2720ce8..de11fe957d3e 100644 --- a/core/java/android/widget/AutoCompleteTextView.java +++ b/core/java/android/widget/AutoCompleteTextView.java @@ -1031,7 +1031,9 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe public void ensureImeVisible(boolean visible) { mPopup.setInputMethodMode(visible ? ListPopupWindow.INPUT_METHOD_NEEDED : ListPopupWindow.INPUT_METHOD_NOT_NEEDED); - showDropDown(); + if (mPopup.isDropDownAlwaysVisible() || (mFilter != null && enoughToFilter())) { + showDropDown(); + } } /** |
