summaryrefslogtreecommitdiffstats
path: root/core/java/android/app
diff options
context:
space:
mode:
authorMike LeBeau <mlebeau@android.com>2009-07-06 14:29:25 -0700
committerMike LeBeau <mlebeau@android.com>2009-07-06 14:29:25 -0700
commit617202a53a26d1b38a41ce69c40b1fffd784c178 (patch)
tree13cec167c3239c40b2c83c83aa4bf2dbd396036a /core/java/android/app
parent4bca97ecaf04c50d5ed49920d119f9ffa6c29402 (diff)
downloadframeworks_base-617202a53a26d1b38a41ce69c40b1fffd784c178.zip
frameworks_base-617202a53a26d1b38a41ce69c40b1fffd784c178.tar.gz
frameworks_base-617202a53a26d1b38a41ce69c40b1fffd784c178.tar.bz2
Fix a bug where clicking the "more results" suggestion with the trackball
did not seem to expand to show the corpus selectors. (http://b/1906643) It turns out that when the trackball was used to select this item, onItemClick was getting called on the listener twice in AutoCompleteTextView#onKeyUp: once when we call onKeyUp on the DropDownListView, and once a little further down when we call performCompletion(). In our case, performCompletion() is useless since it was intended for normal AutoCompleteTextViews which populate text into the TextView when an item in the list is clicked, but we do not rely on this. So the easiest fix is just to make performCompletion() do nothing in our SearchAutoComplete subclass.
Diffstat (limited to 'core/java/android/app')
-rw-r--r--core/java/android/app/SearchDialog.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java
index 0785029..fdb619a 100644
--- a/core/java/android/app/SearchDialog.java
+++ b/core/java/android/app/SearchDialog.java
@@ -1573,6 +1573,15 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
}
/**
+ * We override this method to avoid an extra onItemClick being called on the
+ * drop-down's OnItemClickListener by {@link AutoCompleteTextView#onKeyUp(int, KeyEvent)}
+ * when an item is clicked with the trackball.
+ */
+ @Override
+ public void performCompletion() {
+ }
+
+ /**
* We override this method so that we can allow a threshold of zero, which ACTV does not.
*/
@Override