diff options
author | Eric Laurent <elaurent@google.com> | 2021-02-18 16:55:48 +0100 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2021-02-18 17:03:53 +0100 |
commit | 305b74d80fe967969b7e4d9ea51b9387ba713223 (patch) | |
tree | 27d5b8fd680c13162cd8716f9fd6dbff4059a9f6 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java | |
parent | 0f3b641f82b1fdca0dcf1e08b1927463ccda8e79 (diff) |
AudioService: fix cross deadlock when accessing audio mode
Do not recompute the requested audio mode by calling getMode()
(which takes mDeviceBroker.mSetModeLock) when only the currently
applied mode is needed to make a decision.
This avoids from worrying about cross deadlocks between
mDeviceBroker.mSetModeLock and mDeviceBroker.mDeviceStateLock
in all code paths that read current audio mode.
Store current mode in an atomic integer.
Bug: 180517927
Test: phone calls
Change-Id: I1dae0691bde5946f2f3f7d699e5e8547c8b8d4dd
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions