OSDN Git Service

Make search UI open up quicker to the user.
authorSatish Sampath <satish@android.com>
Wed, 1 Jul 2009 16:48:42 +0000 (17:48 +0100)
committerSatish Sampath <satish@android.com>
Wed, 1 Jul 2009 16:55:31 +0000 (17:55 +0100)
commitfef8d3e4d8f6f46c098d04b3a57409c947ec1c75
tree152d5b23718ae8d019dd85886429db8c32987245
parent74dc3e4a1e4f9c4eed3a3619ffc8beff30b3ec0f
Make search UI open up quicker to the user.

On invoking the search UI, the drop down list box with past queries and shortcut items
appears after a few hundreds of milliseconds on screen. This was because we were
displaying the drop down within the onFilterCompleted callback after the list box filtered
the items based on the given query text. While that code path is necessary, for the first
invocation of the search dialog with an empty query we can show the list box before the
text stuff happens. This change does that, issuing an async request to show the drop
down after pending events have been processed.

Without this change, on an average it took 350ms for the code to show the drop down.
With this change, on an average it takes 150ms.
core/java/android/app/SearchDialog.java
core/java/android/widget/AutoCompleteTextView.java