diff options
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/app/SearchDialog.java | 9 | ||||
| -rw-r--r-- | core/java/android/app/SuggestionsAdapter.java | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java index c2afd070a209..c951ce9a0351 100644 --- a/core/java/android/app/SearchDialog.java +++ b/core/java/android/app/SearchDialog.java @@ -576,7 +576,14 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS } mVoiceButton.setVisibility(visibility); } - + + /** Called by SuggestionsAdapter when the cursor contents changed. */ + void onDataSetChanged() { + if (mSearchAutoComplete != null && mSuggestionsAdapter != null) { + mSearchAutoComplete.onFilterComplete(mSuggestionsAdapter.getCount()); + } + } + /** * Hack to determine whether this is the browser, so we can adjust the UI. */ diff --git a/core/java/android/app/SuggestionsAdapter.java b/core/java/android/app/SuggestionsAdapter.java index 3e11a3f55b07..1ae93150d049 100644 --- a/core/java/android/app/SuggestionsAdapter.java +++ b/core/java/android/app/SuggestionsAdapter.java @@ -189,6 +189,8 @@ class SuggestionsAdapter extends ResourceCursorAdapter { if (DBG) Log.d(LOG_TAG, "notifyDataSetChanged"); super.notifyDataSetChanged(); + mSearchDialog.onDataSetChanged(); + updateSpinnerState(getCursor()); } |
