Closed Bug 919884 Opened 6 years ago Closed 6 years ago

[B2G] [Settings] Wrong connection status for a connected device for initialization.

Categories

(Firefox OS Graveyard :: Gaia::Settings, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(blocking-b2g:koi+, b2g18 affected, b2g-v1.1hd affected, b2g-v1.2 fixed)

RESOLVED FIXED
blocking-b2g koi+
Tracking Status
b2g18 --- affected
b2g-v1.1hd --- affected
b2g-v1.2 --- fixed

People

(Reporter: gyeh, Assigned: arthurcc)

References

Details

Attachments

(1 file)

Build info
* Gecko: v1.2, 85ead3614a3de104ca8b52c63a5b9b35c68feaa5
* Gaia: v1.2, 9d2150bd26ca5ff639114dfb0058d35ab871dcc0

STR
1. Turn off Bluetooth and kill Settings App.
2. Turn on Bluetooth via quick setting.
3. Connect from a Bluetooth headset.
4. Check the connection status of HFP/A2DP by icons on the status bar.
5. Launch Settings App.  Go to "Bluetooth" subpage.

Expect result:
* The connection status should be correctly shown under the device name.
("Connected to phone/media audio")

Actual result:
* The connection status was wrong.
blocking-b2g: --- → koi?
Component: Bluetooth → Gaia::Settings
Triage: This one is koi+, the status is incorrect in settings if launched with BT already connected
blocking-b2g: koi? → koi+
Assignee: nobody → arthur.chen
The root cause seems to be that when changing connected devices without the settings app launched, and it does not aware the changes.
The bug can also be reproduced on v1.1.

Update the STR:

1. Launch the settings app and open the bluetooth subpanel.
2. Pair to bluetooth headset A.
3. Pair to bluetooth headset B. (B is connected now)
4. Close the settings app.
5. Turn off both headsets.
6. Turn on headset A and make sure it is connected.
7. Launch the settings app and open the bluetooth subpanel.

actual result:
A warning is prompted. The states of both devices are empty.

expected result:
The status of headset B should be empty and the status of headset A should be connected (i.e. "Connected to phone/media audio").
This bug is a new one instead of a regression. The root cause is as the previous comment. Evelyn, could you help review the change? Thanks!
Attachment #810936 - Flags: review?(ehung)
Comment on attachment 810936 [details]
link to https://github.com/mozilla-b2g/gaia/pull/12487

r=me, commented on Github. I think the patch is okay but I'm not satisfied with the code flow. To me, displaying connected device is unrelated to restoring connection, so it's weird to couple both. I know it's the only moment we need to enumerate connected device and display their status, and most of the time, we will only need to update individual node when it has connection change... anyway, we may refactor this part in the near future. For now, just address my comment on Github, and r? me after your update. Thanks!!
Attachment #810936 - Flags: review?(ehung)
Comment on attachment 810936 [details]
link to https://github.com/mozilla-b2g/gaia/pull/12487

Comments addressed. Could you help review it again? Thanks!
Attachment #810936 - Flags: review?(ehung)
Comment on attachment 810936 [details]
link to https://github.com/mozilla-b2g/gaia/pull/12487

r=me, thanks!
Attachment #810936 - Flags: review?(ehung) → review+
Thanks!

master: a72b26f0f893b8c322b59db00a2896b0fd705472
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Uplifted a72b26f0f893b8c322b59db00a2896b0fd705472 to:
v1.2: 167e2d8d5da19cb8db75e3b42986b93b7bde6d03
You need to log in before you can comment on or make changes to this bug.