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

Skip to content
Commit a533b994 authored by Chris Thornton's avatar Chris Thornton
Browse files

SoundTriggerHelper: Remove unused models onLoad

If some process tries to start a recognition, the STH will now check to
see if there are any other models that have been loaded and either:
 - Have a callback that's died (determined by pinging the binder)
 - Don't have a callback at all (meaning they didn't clean up after the
   last detection and didn't start it again).
If it finds such a model, it will be stopped and unloaded, freeing up
resources in the HAL.

Test: Manually load model/kill the process and make sure that it is
unloaded the next time some other model is loaded. Also made sure
running models aren't evicted.

Change-Id: Ia1139b47afe5f88102a3773d90f4f056ea3cdc92
parent 2e0d5323
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment