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

Commit 56056038 authored by Chris Thornton's avatar Chris Thornton
Browse files

Keep STH state in sync with HAL

During stopAllRecognitions(), the internal state of a sound model was
being cleared (which made it look like the model was being unloaded).
However, the model was still loaded, so subsequent calls to load a 'new'
model would break.

Bug:28432002

Change-Id: I7090bf52704c6e46e3bb6d495d8fe4b8a1d9e2ad
parent 8e060d31
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -501,7 +501,10 @@ public class SoundTriggerHelper implements SoundTrigger.StatusListener {
                    if (status != STATUS_OK) {
                        Slog.w(TAG, "Error stopping keyphrase model: " + model.getHandle());
                    }
                    model.clearState();
                    model.setStopped();
                    model.setRequested(false);
                    model.clearCallback();
                    model.setRecognitionConfig(null);
                }
            }
            internalClearGlobalStateLocked();