Skip to content
Commit 305b74d8 authored by Eric Laurent's avatar Eric Laurent
Browse files

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
parent 0f3b641f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment