Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b56f2e1 authored by Eric Laurent's avatar Eric Laurent
Browse files

sound trigger: fix abort event init.

Initialize unused fields of recognition abort event
to avoid argument type check exception in JNI.

Bug: 20951546.
Change-Id: I65ed3284464bd9a32406b5305d562fa434abedce
parent 4a95e694
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -787,6 +787,7 @@ void SoundTriggerHwService::Module::setCaptureState_l(bool active)
                mHwDevice->stop_recognition(mHwDevice, model->mHandle);
                // keep model in ACTIVE state so that event is processed by onCallbackEvent()
                struct sound_trigger_phrase_recognition_event phraseEvent;
                memset(&phraseEvent, 0, sizeof(struct sound_trigger_phrase_recognition_event));
                switch (model->mType) {
                case SOUND_MODEL_TYPE_KEYPHRASE:
                    phraseEvent.num_phrases = model->mConfig.num_phrases;