diff options
| author | Leon Scroggins III <scroggo@google.com> | 2010-09-14 10:56:25 -0400 |
|---|---|---|
| committer | Leon Scroggins III <scroggo@google.com> | 2010-09-14 10:56:25 -0400 |
| commit | 4a028009468a95e932fc4fcd9ccdd358e02b1b0a (patch) | |
| tree | 2db0572b129023e1cbf67efaabe710c2ff39d78a /core/java/android/app/SearchDialog.java | |
| parent | 51c18989cf44d14a7ff82c45d9886b7ea55bd068 (diff) | |
Add an option to hide the Voice Search icon.
Some search engines do not support voice search, so provide a flag
to disable showing the icon in the SearchDialog.
Change-Id: I7ef4ad5d382edb86c08014260defa4af6d5eca0a
Diffstat (limited to 'core/java/android/app/SearchDialog.java')
| -rw-r--r-- | core/java/android/app/SearchDialog.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java index 7625c04d61e2..cd22fa13e015 100644 --- a/core/java/android/app/SearchDialog.java +++ b/core/java/android/app/SearchDialog.java @@ -588,7 +588,9 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS */ private void updateVoiceButton(boolean empty) { int visibility = View.GONE; - if (mSearchable.getVoiceSearchEnabled() && empty) { + if ((mAppSearchData == null || !mAppSearchData.getBoolean( + SearchManager.DISABLE_VOICE_SEARCH, false)) + && mSearchable.getVoiceSearchEnabled() && empty) { Intent testIntent = null; if (mSearchable.getVoiceSearchLaunchWebSearch()) { testIntent = mVoiceWebSearchIntent; |
