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
Loading
Please register or sign in to comment