Merge "Add an option to hide the Voice Search icon." into froyo
This commit is contained in:
committed by
Android (Google) Code Review
commit
ca8f3d0428
@ -588,7 +588,9 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
|
|||||||
*/
|
*/
|
||||||
private void updateVoiceButton(boolean empty) {
|
private void updateVoiceButton(boolean empty) {
|
||||||
int visibility = View.GONE;
|
int visibility = View.GONE;
|
||||||
if (mSearchable.getVoiceSearchEnabled() && empty) {
|
if ((mAppSearchData == null || !mAppSearchData.getBoolean(
|
||||||
|
SearchManager.DISABLE_VOICE_SEARCH, false))
|
||||||
|
&& mSearchable.getVoiceSearchEnabled() && empty) {
|
||||||
Intent testIntent = null;
|
Intent testIntent = null;
|
||||||
if (mSearchable.getVoiceSearchLaunchWebSearch()) {
|
if (mSearchable.getVoiceSearchLaunchWebSearch()) {
|
||||||
testIntent = mVoiceWebSearchIntent;
|
testIntent = mVoiceWebSearchIntent;
|
||||||
|
@ -394,6 +394,14 @@ public class SearchManager
|
|||||||
*/
|
*/
|
||||||
public final static String CONTEXT_IS_VOICE = "android.search.CONTEXT_IS_VOICE";
|
public final static String CONTEXT_IS_VOICE = "android.search.CONTEXT_IS_VOICE";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This means that the voice icon should not be shown at all, because the
|
||||||
|
* current search engine does not support voice search.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public final static String DISABLE_VOICE_SEARCH
|
||||||
|
= "android.search.DISABLE_VOICE_SEARCH";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference to the shared system search service.
|
* Reference to the shared system search service.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user