Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17268ccf authored by Mike LeBeau's avatar Mike LeBeau Committed by Android (Google) Code Review
Browse files

Merge "Add new EXTRA_WEB_SEARCH_ONLY to RecognizerIntent API. This can be used...

Merge "Add new EXTRA_WEB_SEARCH_ONLY to RecognizerIntent API. This can be used to avoid triggering any non-web-search actions from the speech recognizer (such as Voice Actions in the Google implementation). The browser will set this to true to avoid triggering non-web-search actions when speech recognition is requested from the browser."
parents 81d5ad51 b30023ca
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -166229,6 +166229,17 @@
 visibility="public"
>
</field>
<field name="EXTRA_WEB_SEARCH_ONLY"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;android.speech.extra.WEB_SEARCH_ONLY&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="LANGUAGE_MODEL_FREE_FORM"
 type="java.lang.String"
 transient="false"
@@ -251252,7 +251263,7 @@
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="arg0" type="T">
<parameter name="t" type="T">
</parameter>
</method>
</interface>
+13 −1
Original line number Diff line number Diff line
@@ -82,7 +82,11 @@ public class RecognizerIntent {

    /**
     * Starts an activity that will prompt the user for speech, sends it through a
     * speech recognizer, and invokes and displays a web search result.
     * speech recognizer, and invokes and either displays a web search result or triggers
     * another type of action based on the user's speech.
     *
     * <p>If you want to avoid triggering any type of action besides web search, you can use
     * the {@link #EXTRA_WEB_SEARCH_ONLY} extra.
     * 
     * <p>Required extras:
     * <ul>
@@ -95,6 +99,7 @@ public class RecognizerIntent {
     *   <li>{@link #EXTRA_LANGUAGE}
     *   <li>{@link #EXTRA_MAX_RESULTS}
     *   <li>{@link #EXTRA_PARTIAL_RESULTS}
     *   <li>{@link #EXTRA_WEB_SEARCH_ONLY}
     * </ul>
     * 
     * <p> Result extras (returned in the result, not to be specified in the request):
@@ -183,6 +188,13 @@ public class RecognizerIntent {
     */
    public static final String EXTRA_MAX_RESULTS = "android.speech.extra.MAX_RESULTS";
    
    /**
     * Optional boolean, to be used with {@link #ACTION_WEB_SEARCH}, to indicate whether to
     * only fire web searches in response to a user's speech. The default is false, meaning
     * that other types of actions can be taken based on the user's speech.
     */
    public static final String EXTRA_WEB_SEARCH_ONLY = "android.speech.extra.WEB_SEARCH_ONLY";

    /**
     * Optional boolean to indicate whether partial results should be returned by the recognizer
     * as the user speaks (default is false).  The server may ignore a request for partial