Fix race condition betweeen Tuner APIs and with onReclaimResources
- Added acquire/releaseLock() in ITunerResourceManager.aidl for Tuner
API implementations to utilize.
- Added more lock around resource related operations that have
race condition with releaseAll() in Tuner.java
- This fix addresses race condition when Tuner object dies as well.
- Added these calls into Tuner API implementations
Also, suppress FLAG_ONEWAY warning for onReclaimResources as it is only
called against OEM/SoC packages that are part of image that goes throug
Google certification.
Bug: 206725267
Bug: 206726459
Bug: 206723996
Test: TunerTest#testResourceReclaimedDifferentProcess() and
testResourceReclaimedDifferentThread()
Change-Id: Ic9aee1e15f53b2d4984c3b4214a392c2c4d5731e
4 files changed