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

Skip to content
Commit 1b669b6e authored by Sal Savage's avatar Sal Savage
Browse files

Have AvrcpControllerService own the active device

This code moves the active device management from functions around a
static objects on the state machine to a functions from the
AvrcpControllerService.

AvrcpControllerService now orchestrates the active device. A device will
become active when:
1. It connects and no other device is connected
2. When you browse that device
3. When you play an item from that device

AvrcpControllerService notifies state machines of their active state
with a new message that goes on the handler. State machines then update
the BluetoothMediaBrowserService accordingly. When there is no active
device set, AvrcpControllerService will clear the
BluetoothMediaBrowserService status. When a new/different device is set,
AvrcpControllerService will send a pause to the previous device.

New tests have been added to prove state machine behavior.

Tag: #stability
Bug: 180416295
Bug: 180416562
Bug: 181374758
Bug: 181374973
Test: atest BluetoothInstrumentationTests
Change-Id: I251498bec049fc4cdfd4e657558649c5cfd3dd6c
parent 8496b3a4
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