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

Skip to content
Commit 18c4317b authored by Jake Hamby's avatar Jake Hamby
Browse files

Show correct A2DP connection status in Bluetooth settings.

When BluetoothSettings is entered via QuickSettings while an A2DP
device is connected, we aren't showing the device connection
status in the UI, because the device list is created before we've
connected to the A2DP and Headset profile services, and we weren't
refreshing the device list UI after getting the callback for
onServiceConnected() and retrieving the list of connected devices.

Add a line to HeadsetServiceListener.onServiceConnected() to call
device.refresh() after we call device.onProfileStateChanged() to
refresh the device list UI. Also copy the logic into A2dpProfile's
onServiceConnected() callback so it will refresh the UI for any
connected A2DP devices.

The reason this bug doesn't show up when entering BT settings
from the main Settings screen is because the onServiceConnected()
callbacks happen before the device list is initialized, so the
UI items are created with the correct connection status. For the
same reason, the bug doesn't occur if the Settings app is already
running and we re-enter it via Bluetooth QuickSettings.

Bug: 8724247
Change-Id: I1a993636ecab18dd6e980e3b4d2485bbed256d74
parent e3eb601d
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