Skip to content
Commit f3e7be00 authored by Ytai Ben-Tsvi's avatar Ytai Ben-Tsvi
Browse files

Wait for an abort event when stopping a model

Because the client callbacks from SoundTriggerMiddleware service are
async, if a client quickly stops and starts a model, then receives a
detection event for that model, it is impossible for it to tell
whether the event corresponding to the previous or current session,
and thus is unable to reason about the resulting state of the model.

To mitigate that, we will always wait for an abort event when a model
is stopped before any other operation is attempted. This way the
model state stays synchronized.

Bug: 191935600
Fixes: 226926627
Test: Manual verification of soundtrigger use-cases. Specifically,
      quick toggling of Assitant and Now Playing via Settings.
Change-Id: Ia1b91e78aa6981a7b3612ae9213af1b37a333d00
parent 64c62ca5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment