Converting sound trigger v2.2 getModelState to be asynchronous
Test: built android with checkbuild flag
Change-Id: Ic12dbfe46aae08666ab02a1a8ee0dbb5c2d9381f
Bug-Id: 70206501
diff --git a/services/soundtrigger/SoundTriggerHalInterface.h b/services/soundtrigger/SoundTriggerHalInterface.h
index 076ca23..0183ece 100644
--- a/services/soundtrigger/SoundTriggerHalInterface.h
+++ b/services/soundtrigger/SoundTriggerHalInterface.h
@@ -72,12 +72,12 @@
virtual int stopAllRecognitions() = 0;
/* Get the current state of a given model.
- * Returns 0 or an error code. If successful it also sets indicated the event pointer
- * and expectes that the caller will free the memory.
+ * Returns 0 or an error code. If successful the state will be returned asynchronously
+ * via a recognition event in the callback method that was registered in the
+ * startRecognition() method.
* Only supported for device api versions SOUND_TRIGGER_DEVICE_API_VERSION_1_2 or above.
*/
- virtual int getModelState(sound_model_handle_t handle,
- struct sound_trigger_recognition_event** event) = 0;
+ virtual int getModelState(sound_model_handle_t handle) = 0;
protected:
SoundTriggerHalInterface() {}