diff options
Diffstat (limited to 'core/java/android/app/SearchDialog.java')
-rw-r--r-- | core/java/android/app/SearchDialog.java | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java index bcb2791..0bb483b 100644 --- a/core/java/android/app/SearchDialog.java +++ b/core/java/android/app/SearchDialog.java @@ -1202,16 +1202,7 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS protected boolean launchSuggestion(int position, int actionKey, String actionMsg) { Cursor c = mSuggestionsAdapter.getCursor(); if ((c != null) && c.moveToPosition(position)) { - // let the cursor know which position was clicked - final Bundle clickResponse = new Bundle(1); - clickResponse.putInt(SearchManager.RESPOND_EXTRA_POSITION_CLICKED, position); - final Bundle response = c.respond(clickResponse); - - // the convention is to send a position to select in response to a click (if applicable) - final int posToSelect = response.getInt( - SearchManager.RESPOND_EXTRA_POSITION_SELECTED, - SuggestionsAdapter.NO_ITEM_TO_SELECT); - mSuggestionsAdapter.setListItemToSelect(posToSelect); + mSuggestionsAdapter.callCursorOnClick(c, position); // launch the intent Intent intent = createIntentFromSuggestion(c, actionKey, actionMsg); |