diff options
| author | Nate Myren <ntmyren@google.com> | 2021-04-20 14:47:34 -0700 |
|---|---|---|
| committer | Nate Myren <ntmyren@google.com> | 2021-04-20 22:12:58 +0000 |
| commit | 1fde398f7feeaa35a75fb0fda445c070ea2ede1f (patch) | |
| tree | 34eba239700c075e0a61c962076c830af7c32d3c /core/java/android | |
| parent | 4f6232fa3c343b76bcb91503092f3b2627541d40 (diff) | |
Add EXTRA_AUDIO_INJECT_SOURCE to RecognizerIntent
Add a constant to signify that the caller of a RecognitionService has
opened an audio stream for the service
Bug: 185936177
Test: build
Change-Id: Id8da84714fef547d2143457c2ad1c0b631e40741
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/speech/RecognizerIntent.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/core/java/android/speech/RecognizerIntent.java b/core/java/android/speech/RecognizerIntent.java index 3b5a6d59e7e6..22ccd23a22bc 100644 --- a/core/java/android/speech/RecognizerIntent.java +++ b/core/java/android/speech/RecognizerIntent.java @@ -16,8 +16,6 @@ package android.speech; -import java.util.ArrayList; - import android.app.Activity; import android.content.ActivityNotFoundException; import android.content.BroadcastReceiver; @@ -28,6 +26,8 @@ import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.os.Bundle; +import java.util.ArrayList; + /** * Constants for supporting speech recognition through starting an {@link Intent} */ @@ -39,7 +39,14 @@ public class RecognizerIntent { * is set by anyone but the system process, it should be overridden by the voice search * implementation. */ - public final static String EXTRA_CALLING_PACKAGE = "calling_package"; + public static final String EXTRA_CALLING_PACKAGE = "calling_package"; + + /** + * The extra key used in an intent which is providing an already opened audio source for the + * RecognitionService to use. + */ + public static final String EXTRA_AUDIO_INJECT_SOURCE = + "android.speech.extra.AUDIO_INJECT_SOURCE"; private RecognizerIntent() { // Not for instantiating. |
