diff options
| author | 2021-04-28 21:47:06 +0800 | |
|---|---|---|
| committer | 2021-05-03 11:48:37 +0800 | |
| commit | 8fbe605e1a9c73e3f03f14d2288972646e9badb0 (patch) | |
| tree | 6a794b252e1ba36d4391cec3d4ee6ec6f56c3d19 | |
| parent | f3040a456bc619772783e938f1109fd766b4d2b3 (diff) | |
Add the javadoc for HotwordDetectionService
Bug: 180945857
Test: Build
Change-Id: I42bb01949ec019da80077eeaf96c63b2c94f70a5
| -rw-r--r-- | core/java/android/service/voice/HotwordDetectionService.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/core/java/android/service/voice/HotwordDetectionService.java b/core/java/android/service/voice/HotwordDetectionService.java index 7e0117df288e..5f4117404181 100644 --- a/core/java/android/service/voice/HotwordDetectionService.java +++ b/core/java/android/service/voice/HotwordDetectionService.java @@ -52,8 +52,20 @@ import java.util.Locale; import java.util.function.IntConsumer; /** - * Implemented by an application that wants to offer detection for hotword. The system will - * start the service after calling {@link VoiceInteractionService#setHotwordDetectionConfig}. + * Implemented by an application that wants to offer detection for hotword. The service can be used + * for both DSP and non-DSP detectors. + * + * The system will bind an application's {@link VoiceInteractionService} first. When {@link + * VoiceInteractionService#createHotwordDetector(PersistableBundle, SharedMemory, + * HotwordDetector.Callback)} or {@link VoiceInteractionService#createAlwaysOnHotwordDetector( + * String, Locale, PersistableBundle, SharedMemory, AlwaysOnHotwordDetector.Callback)} is called, + * the system will bind application's {@link HotwordDetectionService}. Either on a hardware + * trigger or on request from the {@link VoiceInteractionService}, the system calls into the + * {@link HotwordDetectionService} to request detection. The {@link HotwordDetectionService} then + * uses {@link Callback#onDetected(HotwordDetectedResult)} to inform the system that a relevant + * keyphrase was detected, or if applicable uses {@link Callback#onRejected(HotwordRejectedResult)} + * to inform the system that a keyphrase was not detected. The system then relays this result to + * the {@link VoiceInteractionService} through {@link HotwordDetector.Callback}. * * @hide */ |