[Bluetooth] Make GetBluetoothInterface() and StringToBdAddressType() available for profile managers

RESOLVED FIXED in 1.3 Sprint 5 - 11/22

Status

Firefox OS
Bluetooth
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Ben Tian (inactive), Assigned: Ben Tian (inactive))

Tracking

unspecified
1.3 Sprint 5 - 11/22
ARM
Gonk (Firefox OS)
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Declare the functions in header file for profile manager access.
(Assignee)

Updated

5 years ago
Summary: [Bluetoth] Make GetBluetoothInterface() and StringToBdAddressType() available for profile managers → [Bluetooth] Make GetBluetoothInterface() and StringToBdAddressType() available for profile managers
(Assignee)

Updated

5 years ago
Blocks: 938524
No longer blocks: 911943
(Assignee)

Comment 1

5 years ago
Created attachment 832126 [details] [diff] [review]
[final] Patch 1: Make bt interface accessible from profile managers, r=echou

Make GetBluetoothInterface() and StringToBdAddressType() accessible from profile managers. Also fix a warning.
Attachment #832126 - Flags: review?(echou)
(Assignee)

Updated

5 years ago
Depends on: 936732
Comment on attachment 832126 [details] [diff] [review]
[final] Patch 1: Make bt interface accessible from profile managers, r=echou

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

r+ with nits addressed. Please remember to file a followup.

::: dom/bluetooth/bluedroid/gonk/BluetoothServiceBluedroid.cpp
@@ +205,5 @@
>  
> +const bt_interface_t*
> +GetBluetoothInterface()
> +{
> +  return (IsReady()) ? sBtInterface : nullptr;

"return sBtInterface" should work. Any reason to call IsReady()?

::: dom/bluetooth/bluedroid/gonk/BluetoothServiceBluedroid.h
@@ +17,5 @@
> +const bt_interface_t*
> +GetBluetoothInterface();
> +
> +void
> +StringToBdAddressType(const nsAString& aBdAddress,

This function should be placed into class like BluetoothUtil. (I've talked with Ben and he will file a followup to this)
Attachment #832126 - Flags: review?(echou) → review+
(Assignee)

Comment 3

5 years ago
> ::: dom/bluetooth/bluedroid/gonk/BluetoothServiceBluedroid.cpp
> @@ +205,5 @@
> >  
> > +const bt_interface_t*
> > +GetBluetoothInterface()
> > +{
> > +  return (IsReady()) ? sBtInterface : nullptr;
> 
> "return sBtInterface" should work. Any reason to call IsReady()?

IsReady() as a protection ensures sBtInterface is inaccessible when BT is disable. We should consider whether to keep the protection in follow-up bug 939020.
 
> ::: dom/bluetooth/bluedroid/gonk/BluetoothServiceBluedroid.h
> @@ +17,5 @@
> > +const bt_interface_t*
> > +GetBluetoothInterface();
> > +
> > +void
> > +StringToBdAddressType(const nsAString& aBdAddress,
> 
> This function should be placed into class like BluetoothUtil. (I've talked
> with Ben and he will file a followup to this)
Track in follow-up bug 939022.
(Assignee)

Updated

5 years ago
Attachment #832126 - Attachment description: Patch 1 (v1): Make bt interface accessible from profile managers → [final] Patch 1: Make bt interface accessible from profile managers, r=echou
https://hg.mozilla.org/mozilla-central/rev/543aec80baa6
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.3 Sprint 5 - 11/22

Updated

5 years ago
Depends on: 949843
You need to log in before you can comment on or make changes to this bug.