Closed Bug 921999 Opened 6 years ago Closed 6 years ago

Bluetooth Device connection status in Settings is incorrect if remote headset restores connection

Categories

(Firefox OS Graveyard :: Bluetooth, defect)

x86_64
Linux
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: shawnjohnjr, Assigned: ben.tian)

Details

Attachments

(1 file)

STR:
Pre-condition: 
Make two devices paired.
1. Phone connects to Jambox Bluetooth headset (HFP/A2DP enabled), Disconnect
2. Phone connects to another Bluetooth headset SonyEricson DS970 
(which supports both HFP/A2DP), disconnect
=======================================================================
3. Turn on Jambox and get connected
4. Turn off Jamebox, meanwhile turn on DS970 and press connect button
5. Bluetooth "Paired devices" would show two connected "media audio"
Hi Gina, can this bug still be reproduced?
Flags: needinfo?(gyeh)
Let me check and update later
Flags: needinfo?(gyeh)
Update STR:
> Pre-condition: 
> Make two devices paired.
> 1. Phone connects to Jambox Bluetooth headset (HFP/A2DP enabled), Disconnect
> 2. Phone connects to another Bluetooth headset SonyEricson DS970 
> (which supports both HFP/A2DP), disconnect
> =======================================================================
> 3. Turn on Jambox and get connected
4. Turn off Jambox, meanwhile press play/pause button repetitively to trigger connection
> 5. Bluetooth "Paired devices" would show two connected "media audio"
The bug results from illegal sink property changes that are not from the connected sink.

In the STR, when sink A is connected, sink B keeps connecting and updates A2dp sink state from connected (to sink A) to disconnected/connecting (to sink B). Therefore when sink A disconnects, A2dp manager regards sink state unchanged and doesn't notify gaia of connection status change.

The patch updates sink property only if A2dp is disconnected or the change is from connected sink.
Assignee: nobody → btian
Attachment #8362407 - Flags: review?(echou)
Comment on attachment 8362407 [details] [diff] [review]
Patch 1 (v1): allow state change from connected sink only

Delegate to Gina.
Attachment #8362407 - Flags: review?(echou) → review?(gyeh)
Comment on attachment 8362407 [details] [diff] [review]
Patch 1 (v1): allow state change from connected sink only

Review of attachment 8362407 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me.
Attachment #8362407 - Flags: review?(gyeh) → review+
https://hg.mozilla.org/mozilla-central/rev/59e7a57ee3e1
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.