diff options
| author | Nicholas Ambur <nambur@google.com> | 2019-08-22 12:13:29 -0700 |
|---|---|---|
| committer | Nicholas Ambur <nambur@google.com> | 2019-08-30 10:10:18 -0700 |
| commit | 1aa4b4b779f351c59d45fa51b568237961aebfb6 (patch) | |
| tree | a3309ce2db309f77070a4a114dfabe15c72f34dc /core/java | |
| parent | 505d5634fe51e1f96b378b8475b9c78e6e95135e (diff) | |
Add ability to get soundtrigger props from dsp
exposes sound trigger module properties to privileged
system apps with MANAGE_SOUND_TRIGGER permission
Bug: 139071862
Test: GTS test confirmed API accessible and providing valid data
Change-Id: Iec7ba6fc59912f44341fbe8d7f99193b9ead52f0
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/hardware/soundtrigger/SoundTrigger.java | 11 | ||||
| -rw-r--r-- | core/java/com/android/internal/app/ISoundTriggerService.aidl | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/core/java/android/hardware/soundtrigger/SoundTrigger.java b/core/java/android/hardware/soundtrigger/SoundTrigger.java index 5b5bd7661bc5..8a9617e28c4d 100644 --- a/core/java/android/hardware/soundtrigger/SoundTrigger.java +++ b/core/java/android/hardware/soundtrigger/SoundTrigger.java @@ -22,6 +22,7 @@ import static android.system.OsConstants.ENOSYS; import static android.system.OsConstants.EPERM; import static android.system.OsConstants.EPIPE; +import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemApi; import android.annotation.UnsupportedAppUsage; @@ -70,28 +71,27 @@ public class SoundTrigger { * ID used to target any API call to this paricular module. Module * properties are returned by listModules() method. * - * @hide ****************************************************************************/ - public static class ModuleProperties implements Parcelable { + public static final class ModuleProperties implements Parcelable { /** Unique module ID provided by the native service */ - @UnsupportedAppUsage public final int id; /** human readable voice detection engine implementor */ + @NonNull public final String implementor; /** human readable voice detection engine description */ + @NonNull public final String description; /** Unique voice engine Id (changes with each version) */ - @UnsupportedAppUsage + @NonNull public final UUID uuid; /** Voice detection engine version */ public final int version; /** Maximum number of active sound models */ - @UnsupportedAppUsage public final int maxSoundModels; /** Maximum number of key phrases */ @@ -119,7 +119,6 @@ public class SoundTrigger { * recognition callback event */ public final boolean returnsTriggerInEvent; - @UnsupportedAppUsage ModuleProperties(int id, String implementor, String description, String uuid, int version, int maxSoundModels, int maxKeyphrases, int maxUsers, int recognitionModes, boolean supportsCaptureTransition, diff --git a/core/java/com/android/internal/app/ISoundTriggerService.aidl b/core/java/com/android/internal/app/ISoundTriggerService.aidl index 764c0cfbd01c..ea24d5fbb2f7 100644 --- a/core/java/com/android/internal/app/ISoundTriggerService.aidl +++ b/core/java/com/android/internal/app/ISoundTriggerService.aidl @@ -54,4 +54,6 @@ interface ISoundTriggerService { boolean isRecognitionActive(in ParcelUuid parcelUuid); int getModelState(in ParcelUuid soundModelId); + + @nullable SoundTrigger.ModuleProperties getModuleProperties(); } |
