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

Skip to content
Commit 9e59d28e authored by Qasim Javed's avatar Qasim Javed
Browse files

Wait until A2DP source shutdown completes when active peer is set to the empty address.

Currently, there is a race condition when switching A2DP devices. We
first set the active peer to the empty address and then to the newly
active device. When the active peer is set to the empty address, we
shutdown the A2DP source which takes time. Before that shutdown
completes, we try to set the active peer to the newly active device.
Since the source has not finished shutting down completely, this request
to start a new A2DP source is ignored by the stack.

Fix this by waiting until shutdown is complete and A2DP source state is
set to kStateOff. This way, when setActivePeer with empty address
returns, A2DP source state would already have been set to kStateOff.

Bug: 253974905
Tag: #refactor
Test: manual by using log patterns

Change-Id: I2a51abfd3a68e5efd66dc117fda4b0697816bb04
parent 064b49b4
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