File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -588,7 +588,9 @@ private void updateQueryHint() {
588588 */
589589 private void updateVoiceButton (boolean empty ) {
590590 int visibility = View .GONE ;
591- if (mSearchable .getVoiceSearchEnabled () && empty ) {
591+ if ((mAppSearchData == null || !mAppSearchData .getBoolean (
592+ SearchManager .DISABLE_VOICE_SEARCH , false ))
593+ && mSearchable .getVoiceSearchEnabled () && empty ) {
592594 Intent testIntent = null ;
593595 if (mSearchable .getVoiceSearchLaunchWebSearch ()) {
594596 testIntent = mVoiceWebSearchIntent ;
Original file line number Diff line number Diff line change @@ -394,6 +394,14 @@ public class SearchManager
394394 */
395395 public final static String CONTEXT_IS_VOICE = "android.search.CONTEXT_IS_VOICE" ;
396396
397+ /**
398+ * This means that the voice icon should not be shown at all, because the
399+ * current search engine does not support voice search.
400+ * @hide
401+ */
402+ public final static String DISABLE_VOICE_SEARCH
403+ = "android.search.DISABLE_VOICE_SEARCH" ;
404+
397405 /**
398406 * Reference to the shared system search service.
399407 */
You can’t perform that action at this time.
0 commit comments