From 5e2c81dca659aaf392e99574f15768caea24c002 Mon Sep 17 00:00:00 2001 From: Amith Yamasani Date: Thu, 11 Feb 2010 07:29:45 -0800 Subject: Remove in-app to global search toggle. Bug: 2436539 Quick fix to ignore the search key in SearchDialog. Need to cleanup related code. --- core/java/android/app/SearchDialog.java | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'core/java/android/app/SearchDialog.java') diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java index 7fa5b08d60ae..63e95c0aa8f5 100644 --- a/core/java/android/app/SearchDialog.java +++ b/core/java/android/app/SearchDialog.java @@ -761,12 +761,6 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS return false; } - if (keyCode == KeyEvent.KEYCODE_SEARCH && event.getRepeatCount() == 0) { - event.startTracking(); - // Consume search key for later use. - return true; - } - // if it's an action specified by the searchable activity, launch the // entered query with the action key SearchableInfo.ActionKeyInfo actionKey = mSearchable.findActionKey(keyCode); @@ -778,24 +772,6 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS return super.onKeyDown(keyCode, event); } - @Override - public boolean onKeyUp(int keyCode, KeyEvent event) { - if (DBG) Log.d(LOG_TAG, "onKeyUp(" + keyCode + "," + event + ")"); - if (mSearchable == null) { - return false; - } - - if (keyCode == KeyEvent.KEYCODE_SEARCH && event.isTracking() - && !event.isCanceled()) { - // If the search key is pressed, toggle between global and in-app search. If we are - // currently doing global search and there is no in-app search context to toggle to, - // just don't do anything. - return toggleGlobalSearch(); - } - - return super.onKeyUp(keyCode, event); - } - /** * Callback to watch the textedit field for empty/non-empty */ -- cgit v1.2.3