diff options
author | Eric Laurent <elaurent@google.com> | 2015-05-22 11:39:53 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2015-05-22 11:39:53 -0700 |
commit | 7b56f2e1e9495915ad9dea9afdc13e9e5d5b7536 (patch) | |
tree | 57549b41a4d8bda27199346169dd27863d758b56 /services/soundtrigger | |
parent | 4a95e69406aa2e9896d865962d6d947ebbdac6fc (diff) | |
download | frameworks_av-7b56f2e1e9495915ad9dea9afdc13e9e5d5b7536.zip frameworks_av-7b56f2e1e9495915ad9dea9afdc13e9e5d5b7536.tar.gz frameworks_av-7b56f2e1e9495915ad9dea9afdc13e9e5d5b7536.tar.bz2 |
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
Diffstat (limited to 'services/soundtrigger')
-rw-r--r-- | services/soundtrigger/SoundTriggerHwService.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/services/soundtrigger/SoundTriggerHwService.cpp b/services/soundtrigger/SoundTriggerHwService.cpp index 081aff7..9de6fe2 100644 --- a/services/soundtrigger/SoundTriggerHwService.cpp +++ b/services/soundtrigger/SoundTriggerHwService.cpp @@ -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; |