Closed Bug 938521 Opened 11 years ago Closed 11 years ago

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

Categories

(Firefox OS Graveyard :: Bluetooth, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
1.3 Sprint 5 - 11/22

People

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

References

Details

Attachments

(1 file)

Declare the functions in header file for profile manager access.
Summary: [Bluetoth] Make GetBluetoothInterface() and StringToBdAddressType() available for profile managers → [Bluetooth] Make GetBluetoothInterface() and StringToBdAddressType() available for profile managers
Blocks: 938524
No longer blocks: 911943
Make GetBluetoothInterface() and StringToBdAddressType() accessible from profile managers. Also fix a warning.
Attachment #832126 - Flags: review?(echou)
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+
> ::: 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.
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
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.3 Sprint 5 - 11/22
Depends on: 949843
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: