Closed Bug 838080 Opened 11 years ago Closed 11 years ago

[b2g-bluetooth] Cannot receive all events after a series of actions

Categories

(Core :: DOM: Device Interfaces, defect)

21 Branch
ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21
blocking-b2g -
Tracking Status
firefox20 --- wontfix
firefox21 --- fixed
b2g18 + fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- wontfix

People

(Reporter: gyeh, Assigned: gyeh)

Details

Attachments

(1 file, 1 obsolete file)

* Environment:
Phone - Unagi
gaia master(git): 50f724828e40e63d5634fec40b9ecde1c74b461b
gecko b2g-18(hg): 2ae874433a14

* STR:
1. Launch Settings and turn off Bluetooth
2. Press Home button and launch Gallery
3. Select one picture and share by Bluetooth Transfer
4. Tap cancel when you see a list of paired devices
5. Go back to Settings

* Expected Result:
- Nearby devices are shown
- Should be able to unpair with a paired device

* Actual Result:
- No nearby devices are shown
- After unpairing, the device is still shown in the list of paired devices
I checked the implementation in Gecko. The root cause is that the Bluetooth Transfer app is killed after tapping "Cancel" button, which triggers function UnregisterAllSignalHandlers() and all signal handlers are removed. That's why we cannot receive events like ondevicefound/ondevicecreate/onadapteradded in Settings app. 

An proper way for this situation is that we should only remove signal handlers regarding to the just-killed app rather than all signal handlers.
When a child process is killed, only signal handlers for child process are removed from table in BluetoothService.
Attachment #710069 - Flags: review?(echou)
Attachment #710069 - Flags: review?(echou) → review+
Nominate as tef+

Without this patch, the Bluetooth part in Settings app cannot work for scenario in Comment 0.
blocking-b2g: --- → tef?
Try run for c6257978d3cb is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=c6257978d3cb
Results (out of 14 total builds):
    success: 14
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/gyeh@mozilla.com-c6257978d3cb
Try run for cf7e0db3ead0 is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=cf7e0db3ead0
Results (out of 18 total builds):
    success: 17
    warnings: 1
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/gyeh@mozilla.com-cf7e0db3ead0
https://hg.mozilla.org/mozilla-central/rev/3a7b2f3a36a6
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Not blocking but tracking, please nominate for uplift with a clearer description of the risk/reward.
blocking-b2g: tef? → -
tracking-b2g18: --- → +
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: