summaryrefslogtreecommitdiffstats
path: root/core/java/android/speech
diff options
context:
space:
mode:
authorMike LeBeau <mlebeau@android.com>2010-02-26 11:46:00 -0800
committerMike LeBeau <mlebeau@android.com>2010-02-26 15:20:56 -0800
commit340acd870ad05ec7b18ea4d7b3f6fa31b2360dd4 (patch)
tree08296a9d70c12073c61c2aaa54491924618480d3 /core/java/android/speech
parent3f016cfd482721ded01109b8f5c07dfa214ccb05 (diff)
downloadframeworks_base-340acd870ad05ec7b18ea4d7b3f6fa31b2360dd4.zip
frameworks_base-340acd870ad05ec7b18ea4d7b3f6fa31b2360dd4.tar.gz
frameworks_base-340acd870ad05ec7b18ea4d7b3f6fa31b2360dd4.tar.bz2
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).
Diffstat (limited to 'core/java/android/speech')
-rw-r--r--core/java/android/speech/RecognizerIntent.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/java/android/speech/RecognizerIntent.java b/core/java/android/speech/RecognizerIntent.java
index bf411e1..d55a943 100644
--- a/core/java/android/speech/RecognizerIntent.java
+++ b/core/java/android/speech/RecognizerIntent.java
@@ -298,6 +298,15 @@ public class RecognizerIntent {
"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
* specified - a locale string like "en-US".