Adding getModelState API to sound trigger
Test: built android
Bug-Id: 70206501
Change-Id: I8f45fd86bc14544c676c94daeea71a0ecebdbe03
diff --git a/soundtrigger/2.0/default/SoundTriggerHalImpl.h b/soundtrigger/2.0/default/SoundTriggerHalImpl.h
index 5a9f0e1..fbe24c1 100644
--- a/soundtrigger/2.0/default/SoundTriggerHalImpl.h
+++ b/soundtrigger/2.0/default/SoundTriggerHalImpl.h
@@ -167,8 +167,11 @@
static void recognitionCallback(struct sound_trigger_recognition_event* halEvent, void* cookie);
const char* mModuleName;
- struct sound_trigger_hw_device* mHwDevice;
+
volatile atomic_uint_fast32_t mNextModelId;
+
+ protected:
+ struct sound_trigger_hw_device* mHwDevice;
DefaultKeyedVector<int32_t, sp<SoundModelClient> > mClients;
Mutex mLock;
};