Use package name, pid, uid to check permission of capturing hotword.
Package name will be cached in ModuleClient when attaching a client. It
will be used when querying permission of capturing hotword.
Test: test with logging.
Bug: 74078996
Bug: 122721589
Change-Id: Icd2911f5d331d243c9eb5d58003ce5525c70c81e
diff --git a/include/soundtrigger/SoundTrigger.h b/include/soundtrigger/SoundTrigger.h
index 2e2ff7a..ccc61dc 100644
--- a/include/soundtrigger/SoundTrigger.h
+++ b/include/soundtrigger/SoundTrigger.h
@@ -36,10 +36,12 @@
virtual ~SoundTrigger();
- static status_t listModules(struct sound_trigger_module_descriptor *modules,
+ static status_t listModules(const String16& opPackageName,
+ struct sound_trigger_module_descriptor *modules,
uint32_t *numModules);
- static sp<SoundTrigger> attach(const sound_trigger_module_handle_t module,
- const sp<SoundTriggerCallback>& callback);
+ static sp<SoundTrigger> attach(const String16& opPackageName,
+ const sound_trigger_module_handle_t module,
+ const sp<SoundTriggerCallback>& callback);
static status_t setCaptureState(bool active);