From 6942330251cd778f85169c6265c584648b42428d Mon Sep 17 00:00:00 2001 From: Karl Rosaen Date: Wed, 5 Aug 2009 10:07:06 -0700 Subject: [PATCH] Remove the menu from the search dialog since there are a couple of issues with it we don't have time to fix for donut. Fixes bugs 2034242 and 2034216 (the issues with the menu showing up above the ime, and triggering the ime to reshow when closed). --- core/java/android/app/SearchDialog.java | 33 ------------------------- 1 file changed, 33 deletions(-) diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java index 1d53eabc3d79a..70aceebad0aed 100644 --- a/core/java/android/app/SearchDialog.java +++ b/core/java/android/app/SearchDialog.java @@ -693,39 +693,6 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS return mLaunchComponent.flattenToShortString().startsWith("com.android.browser/"); } - /* - * Menu. - */ - - @Override - public boolean onCreateOptionsMenu(Menu menu) { - // Show search settings menu item if anyone handles the intent for it - Intent settingsIntent = new Intent(SearchManager.INTENT_ACTION_SEARCH_SETTINGS); - settingsIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - PackageManager pm = getContext().getPackageManager(); - ActivityInfo activityInfo = settingsIntent.resolveActivityInfo(pm, 0); - if (activityInfo != null) { - settingsIntent.setClassName(activityInfo.applicationInfo.packageName, - activityInfo.name); - CharSequence label = activityInfo.loadLabel(getContext().getPackageManager()); - menu.add(Menu.NONE, Menu.NONE, Menu.NONE, label) - .setIcon(android.R.drawable.ic_menu_preferences) - .setAlphabeticShortcut('P') - .setIntent(settingsIntent); - return true; - } - return super.onCreateOptionsMenu(menu); - } - - @Override - public boolean onMenuOpened(int featureId, Menu menu) { - // The menu shows up above the IME, regardless of whether it is in front - // of the drop-down or not. This looks weird when there is no IME, so - // we make sure it is visible. - mSearchAutoComplete.ensureImeVisible(); - return super.onMenuOpened(featureId, menu); - } - /** * Listeners of various types */