Closed Bug 1016186 Opened 6 years ago Closed 6 years ago

Do not fire adapteradded event when BT is turned on

Categories

(Firefox OS Graveyard :: Bluetooth, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
2.0 S4 (20june)

People

(Reporter: ben.tian, Assigned: ben.tian)

References

Details

(Whiteboard: [webbt-api][p=1])

Attachments

(2 files, 2 obsolete files)

TODO:
- do not fire adapteradded event when BT is turned on
- do not listen to setting change for BT on/off

In refined WebBluetooth API [1], BluetoothManager.onadapteradded event handler is triggered only when a new adapter is plugged in. Gecko informs applications of BT on/off by BluetoothAdapter.onattributechanged of property BluetoothAdapter.state.

[1] https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2
Whiteboard: [webbt-api]
Attached patch WIP patch (v1) (obsolete) — Splinter Review
Assignee: nobody → btian
Attached patch WIP patch (v2) (obsolete) — Splinter Review
Remove unused function BluetoothService::RemoveObserverFromTable in bug 1016243.
Attachment #8429119 - Attachment is obsolete: true
Depends on: webbt-api-onoff
Attachment #8433969 - Flags: review?(echou)
Wrap nsRefPtr<BluetoothAdapter> otherwise applications cannot get BluetoothAdapter.
Attachment #8434754 - Flags: review?(echou)
Attachment #8433969 - Flags: review?(echou) → review+
Attachment #8434754 - Flags: review?(echou) → review+
https://hg.mozilla.org/mozilla-central/rev/60298f8c95af
https://hg.mozilla.org/mozilla-central/rev/695234b1c393
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.0 S4 (20june)
Whiteboard: [webbt-api] → [webbt-api][p=1]
You need to log in before you can comment on or make changes to this bug.