summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorYtai Ben-Tsvi <ytai@google.com>2020-02-13 16:24:56 -0800
committerYtai Ben-Tsvi <ytai@google.com>2020-02-14 10:43:36 -0800
commit406619f4f32a2210e01c6b2c4752615213052079 (patch)
tree4886d9930760daf89c9191fa16c160010ed11833 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent54e0f0a3ec8c597482016bd711c6b928e9f13311 (diff)
Avoid risk of deadlock between APM and sound trigger
Sound trigger calls into audio policy manager (APM) for the sake of allocating and releasing audio sessions. APM calls into sound trigger for the sake of notifying it of external capture session start/end. Both calls are essentially synchronous, i.e. required for the completion of the operations that trigger them. Since both services use coarse locks to protect their state, if both those calls happen concurrently, a deadlock would result. The fix is to invoke AudioPolicyManager::{acquire/release}SoundTriggerSession() outside of the critical section of SoundTriggerModule. Bug: 148691451 Change-Id: I157367b9e43963e37344958e1647e9f6c29d5e6e
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions