Fix modelUnload deadlock
The concurrency policy for this module is that the lock should not be held while calling stopRecognition and unloadModel into the HAL -- however, that was not being observed for unloadModel. Update the framework state under the lock, and then drop it to call unloadModel on the HAL interface. There are no post-conditions on the STHAL call that the framework cares about, so this we don't need an unloading state, and this is safe. There could be an issue if we state protected the onModelUnloaded callback, but the current implementation fails to do this regardless (leaves it up to the callers), so it is not an issue. Fixes: 374908863 Test: compiles Flag: EXEMPT trivial bugfix Change-Id: I625af495bb28baf6cdccd1916eda772889e71597
Loading
Please register or sign in to comment