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

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

Merge "Add an extra which allows to query *only* for the voice search language...

Merge "Add an extra which allows to query *only* for the voice search language preference. This will be used by e.g. LatinIME to avoid extra computation when this is all that's needed (probably a common use case for this API)."
parents d84aca7d 340acd87
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -138421,6 +138421,17 @@
 visibility="public"
>
</field>
<field name="EXTRA_ONLY_RETURN_LANGUAGE_PREFERENCE"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;android.speech.extra.ONLY_RETURN_LANGUAGE_PREFERENCE&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="EXTRA_PARTIAL_RESULTS"
 type="java.lang.String"
 transient="false"
+9 −0
Original line number Diff line number Diff line
@@ -297,6 +297,15 @@ public class RecognizerIntent {
    public static final String ACTION_GET_LANGUAGE_DETAILS =
            "android.speech.action.GET_LANGUAGE_DETAILS";
    
    /**
     * Specify this boolean extra in a broadcast of {@link #ACTION_GET_LANGUAGE_DETAILS} to
     * indicate that only the current language preference is needed in the response. This
     * avoids any additional computation if all you need is {@link #EXTRA_LANGUAGE_PREFERENCE}
     * in the response.
     */
    public static final String EXTRA_ONLY_RETURN_LANGUAGE_PREFERENCE =
            "android.speech.extra.ONLY_RETURN_LANGUAGE_PREFERENCE";
    
    /**
     * The key to the extra in the {@link Bundle} returned by {@link #ACTION_GET_LANGUAGE_DETAILS}
     * which is a {@link String} that represents the current language preference this user has