[bluedroid] Set BT_SCAN_MODE to Connectable after Bluetooth turned on

RESOLVED FIXED in 1.3 Sprint 5 - 11/22

Status

defect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: shawnjohnjr, Assigned: shawnjohnjr)

Tracking

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

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

[bluedroid] Set BT_SCAN_MODE to Connectable after Bluetooth turned on.
Otherwise, Page is disabled. All connection will be blocked.
This patch is based on new architecture after patch sets in Bug 936732 commit.
This can resolve incoming connection request ended up with Page Timeout.
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → ARM
Comment on attachment 832168 [details] [diff] [review]
Bug 938529 - [bluedroid] Set BT_SCAN_MODE to Connectable after Bluetooth turned on

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

r=me with nit addressed.

::: dom/bluetooth/bluedroid/gonk/BluetoothServiceBluedroid.cpp
@@ +167,5 @@
>    BT_LOGD("%s, BT_STATE:%d", __FUNCTION__, aStatus);
>    nsAutoString signalName;
> +  bt_property_t prop;
> +  bt_scan_mode_t mode;
> +  prop.type = BT_PROPERTY_ADAPTER_SCAN_MODE;

nit: please move these variables into the if-block since they are only used inside.
Attachment #832168 - Flags: review?(echou) → review+
The same concern that I have, these variables scope only in if-block, we could hit problem that we resolved previously regarding set_property. So do we really need to change it?
(In reply to Shawn Huang [:shuang] [:shawnjohnjr] from comment #5)
> The same concern that I have, these variables scope only in if-block, we
> could hit problem that we resolved previously regarding set_property. So do
> we really need to change it?

All we have to do is make sure arguments passed into set_adapter_property() would be still alive when set_adapter_property() is called.
https://hg.mozilla.org/mozilla-central/rev/75516a2a7c3e
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.3 Sprint 5 - 11/22
You need to log in before you can comment on or make changes to this bug.