Debian Codegraph @

core/java/android/service/voice/IHotwordDetectionService.aidl

raw
1 /*
2 * Copyright (C) 2020 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package android.service.voice;
18
19 import android.content.ContentCaptureOptions;
20 import android.hardware.soundtrigger.SoundTrigger;
21 import android.media.AudioFormat;
22 import android.os.IBinder;
23 import android.os.IRemoteCallback;
24 import android.os.ParcelFileDescriptor;
25 import android.os.PersistableBundle;
26 import android.os.SharedMemory;
27 import android.service.voice.IDspHotwordDetectionCallback;
28 import android.view.contentcapture.IContentCaptureManager;
29
30 /**
31 * Provide the interface to communicate with hotword detection service.
32 *
33 * @hide
34 */
35 oneway interface IHotwordDetectionService {
36 void detectFromDspSource(
37 in SoundTrigger.KeyphraseRecognitionEvent event,
38 in AudioFormat audioFormat,
39 long timeoutMillis,
40 in IDspHotwordDetectionCallback callback);
41
42 void detectFromMicrophoneSource(
43 in ParcelFileDescriptor audioStream,
44 int audioSource,
45 in AudioFormat audioFormat,
46 in PersistableBundle options,
47 in IDspHotwordDetectionCallback callback);
48
49 void updateState(
50 in PersistableBundle options,
51 in SharedMemory sharedMemory,
52 in IRemoteCallback callback);
53
54 void updateAudioFlinger(in IBinder audioFlinger);
55
56 void updateContentCaptureManager(
57 in IContentCaptureManager contentCaptureManager,
58 in ContentCaptureOptions options);
59
60 /**
61 * Simply requests the service to trigger the callback, so that the system can check its
62 * identity.
63 */
64 void ping(in IRemoteCallback callback);
65
66 void stopDetection();
67 }