summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Sergey Volnov <volnov@google.com> 2021-03-31 16:16:29 +0100
committer Sergey Volnov <volnov@google.com> 2021-03-31 21:20:21 +0100
commitf16e2b1d0728f0869164623b75c4769b3216ab67 (patch)
treee50076757ada5e3038eab9edb46b2c30eff8fcf9
parent9a7ad7fa85cf9c68238c8b33d3402424d0bf08d4 (diff)
Add a comment to speech recognition service requiring clients targeting
Android 11 to specify a <queries> tag. Bug: 173748514 Test: N/A Change-Id: If70dde1bff5d79e258e3759a1f9027d51de6b441
-rw-r--r--core/java/android/speech/SpeechRecognizer.java24
1 files changed, 23 insertions, 1 deletions
diff --git a/core/java/android/speech/SpeechRecognizer.java b/core/java/android/speech/SpeechRecognizer.java
index aea94bfb1bbb..b29598e1bb56 100644
--- a/core/java/android/speech/SpeechRecognizer.java
+++ b/core/java/android/speech/SpeechRecognizer.java
@@ -205,6 +205,17 @@ public class SpeechRecognizer {
* command to the created {@code SpeechRecognizer}, otherwise no notifications will be
* received.
*
+ * <p>For apps targeting Android 11 (API level 30) interaction with a speech recognition
+ * service requires <queries> element to be added to the manifest file:
+ * <pre>{@code
+ * <queries>
+ * <intent>
+ * <action
+ * android:name="android.speech.RecognitionService" />
+ * </intent>
+ * </queries>
+ * }</pre>
+ *
* @param context in which to create {@code SpeechRecognizer}
* @return a new {@code SpeechRecognizer}
*/
@@ -222,7 +233,18 @@ public class SpeechRecognizer {
* {@link SpeechRecognizer} to. Normally you would not use this; use
* {@link #createSpeechRecognizer(Context)} instead to use the system default recognition
* service.
- *
+ *
+ * <p>For apps targeting Android 11 (API level 30) interaction with a speech recognition
+ * service requires <queries> element to be added to the manifest file:
+ * <pre>{@code
+ * <queries>
+ * <intent>
+ * <action
+ * android:name="android.speech.RecognitionService" />
+ * </intent>
+ * </queries>
+ * }</pre>
+ *
* @param context in which to create {@code SpeechRecognizer}
* @param serviceComponent the {@link ComponentName} of a specific service to direct this
* {@code SpeechRecognizer} to