Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec11ac49 authored by Anubhav Gupta's avatar Anubhav Gupta Committed by Andre Eisenbach
Browse files

A2DP: Use mutex to only to check and set HAL state

In multi-threaded env A2DP state gets updated to suspended
after checking and before acquiring mutex lock. A2DP State
should be checked inside mutex lock to avoid checking against
inconsistent state.
Moreover this change prevents overwriting of state
from AUDIO_A2DP_STATE_SUSPENDED to AUDIO_A2DP_STATE_STOPPED
which would start the data path when there is data inflow
from audio in suspended state, which is not intended.
This change helps avoiding above wrong actions.

Bug: 22028876
Change-Id: I4fb73c1a6851fa97d539860d5fc0b8022b019bc1
parent 4df3ea4c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment