summaryrefslogtreecommitdiff
path: root/core/java/android/widget/AutoCompleteTextView.java
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-07-28 11:29:15 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2009-07-28 11:29:15 -0700
commit48000fe23a339322429d6eb306bad0a30a49f62d (patch)
treec7cb518c675e78f331c8cd0e9c67377e7468f709 /core/java/android/widget/AutoCompleteTextView.java
parentf7573bd2b7bb63d78fa8f0003ba49be10b128753 (diff)
parentc6590d6f390fc69fe15a9a565327a8f8c97f107b (diff)
am c6590d6f: Merge change 8759 into donut
Merge commit 'c6590d6f390fc69fe15a9a565327a8f8c97f107b' * commit 'c6590d6f390fc69fe15a9a565327a8f8c97f107b': Cancel search on BACK if IME is obscured.
Diffstat (limited to 'core/java/android/widget/AutoCompleteTextView.java')
-rw-r--r--core/java/android/widget/AutoCompleteTextView.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java
index e613ec432710..e8b76729a891 100644
--- a/core/java/android/widget/AutoCompleteTextView.java
+++ b/core/java/android/widget/AutoCompleteTextView.java
@@ -209,8 +209,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
private void onClickImpl() {
// If the dropdown is showing, bring it back in front of the soft
// keyboard when the user touches the text field.
- if (mPopup.isShowing() &&
- mPopup.getInputMethodMode() == PopupWindow.INPUT_METHOD_NOT_NEEDED) {
+ if (mPopup.isShowing() && isInputMethodNotNeeded()) {
ensureImeVisible();
}
}
@@ -1089,6 +1088,13 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
}
/**
+ * @hide internal used only here and SearchDialog
+ */
+ public boolean isInputMethodNotNeeded() {
+ return mPopup.getInputMethodMode() == PopupWindow.INPUT_METHOD_NOT_NEEDED;
+ }
+
+ /**
* <p>Displays the drop down on screen.</p>
*/
public void showDropDown() {
@@ -1097,7 +1103,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
int widthSpec = 0;
int heightSpec = 0;
- boolean noInputMethod = mPopup.getInputMethodMode() == PopupWindow.INPUT_METHOD_NOT_NEEDED;
+ boolean noInputMethod = isInputMethodNotNeeded();
if (mPopup.isShowing()) {
if (mDropDownWidth == ViewGroup.LayoutParams.FILL_PARENT) {