a9fd7bc05c
Fix 3 issues in SoundTriggerHelper when a call is active: 1) Do not actually load a sound model when recognition start is requested but disabled because of and active call or any other reason. Previously we were loading the sound model even if actual start was deferred until enabled. 2) Allow to start recognition while disabled: the recognition start request is stored as pending and will be executed when enabled again. 3) Process call state change with enough delay when call ends to allow time for the HAL to process the call disconnect notification before re enabling pending recognitions. Also remove assumption on valid model handle values. Test: repro steps in b/152723355 Bug: 152723355 Change-Id: Id46ae8c285426ed2ace8a6d80478fecb98f4ec33