[bluetooth2] LeScan keeps scanning even after app stopped

RESOLVED FIXED

Status

Firefox OS
Bluetooth
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: elin, Assigned: jaliu)

Tracking

unspecified
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(firefox41 fixed)

Details

(Whiteboard: [webbt-api])

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

3 years ago
If I call startLeScan in my app, 
and then stop my app from WebIDE or task manager without calling stopLeScan first,
it will keep scanning until I disable bluetooth.
(Assignee)

Updated

3 years ago
Assignee: nobody → jaliu
(Assignee)

Updated

3 years ago
Status: NEW → ASSIGNED
Whiteboard: [webbt-api]

Updated

3 years ago
Blocks: 1165848
(Assignee)

Comment 1

3 years ago
Created attachment 8607387 [details] [diff] [review]
Stop LE scans when Bluetooth adapter is disconnected from its owner. (v1)
Attachment #8607387 - Flags: review?(joliu)
Comment on attachment 8607387 [details] [diff] [review]
Stop LE scans when Bluetooth adapter is disconnected from its owner. (v1)

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

I'm sorry for the delay here.
The patch looks good to me, thanks.

::: dom/bluetooth/bluetooth2/BluetoothAdapter.cpp
@@ +340,5 @@
>  BluetoothAdapter::DisconnectFromOwner()
>  {
>    DOMEventTargetHelper::DisconnectFromOwner();
>  
> +  Cleanup();

nit: remove the empty line before this line.
Attachment #8607387 - Flags: review?(joliu) → review+
(Assignee)

Comment 3

3 years ago
Created attachment 8610310 [details] [diff] [review]
Stop LE scans when Bluetooth adapter is disconnected from its owner. (v2)

- revise previous patch based on #comment 2
- add reviewer's name to commit message

Thank Jocelyn for reviewing the patch.
Attachment #8607387 - Attachment is obsolete: true
(Assignee)

Comment 4

3 years ago
Skip the "Pushing to Try" procedure since Bluetooth API v2 hasn't be covered by tinderbox.

Comment 5

3 years ago
https://hg.mozilla.org/integration/b2g-inbound/rev/f2fb0ce117eb
(Reporter)

Comment 6

3 years ago
I tried this patch and it works!
Thanks a million!
https://hg.mozilla.org/mozilla-central/rev/f2fb0ce117eb
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox41: --- → fixed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.