Closed Bug 790136 Opened 12 years ago Closed 12 years ago

[b2g-bluetooth] Register HFP_AG/HSP_AG services

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: echou, Assigned: echou)

References

Details

(Whiteboard: [LOE:S])

Attachments

(3 files, 1 obsolete file)

In order to tell other Bluetooth devices that we support HFP/HSP, we need to register HFP_AG/HSP_AG in SDP database.
Assignee: nobody → echou
Whiteboard: [LOE:S]
BluetoothDBusService::StopInternal() should be called before really turning down Bluetooth, otherwise actions like RemoveReservedServices wouldn't be able to executed because bluetoothd was already killed after StartStopBluetooth(false).
Attachment #660298 - Flags: review?(kyle)
Services are registered after adapter path is created. Services are unregistered before shutdown Bluetooth. I kept the adapterPath as a static nsString for unregistering use and updated it whenever we got adapteradded event.
Attachment #660303 - Flags: review?(kyle)
Attachment #660303 - Attachment description: patch 3: v3: Registered/Unregistered HFP_AG/HSP_AG services → patch 3: v1: Registered/Unregistered HFP_AG/HSP_AG services
Attachment #660296 - Flags: review?(kyle) → review+
Attachment #660298 - Flags: review?(kyle) → review+
Comment on attachment 660303 [details] [diff] [review]
patch 3: v1: Registered/Unregistered HFP_AG/HSP_AG services

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

::: dom/bluetooth/linux/BluetoothDBusService.cpp
@@ +568,5 @@
> +
> +  uuids.AppendElement((uint32_t)(BluetoothServiceUuid::HandsfreeAG >> 32));
> +  uuids.AppendElement((uint32_t)(BluetoothServiceUuid::HeadsetAG >> 32));
> +
> +  BluetoothService* bs = BluetoothService::Get();

Nit: Might want to try to get service before building the uuids, just to save some work.
Attachment #660303 - Flags: review?(kyle) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: