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

RESOLVED FIXED in Firefox 21



6 years ago
6 years ago


(Reporter: gyeh, Assigned: gyeh)


21 Branch
Gonk (Firefox OS)

Firefox Tracking Flags

(blocking-b2g:-, firefox20 wontfix, firefox21 fixed, b2g18+ fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 wontfix)



(1 attachment, 1 obsolete attachment)



6 years ago
* 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

Comment 1

6 years ago
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.

Comment 2

6 years ago
Created attachment 710069 [details] [diff] [review]
Patch 1(v1): Don't remove all observers in signal table when child process is killed

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+

Comment 3

6 years ago
Nominate as tef+

Without this patch, the Bluetooth part in Settings app cannot work for scenario in Comment 0.
blocking-b2g: --- → tef?

Comment 4

6 years ago
Created attachment 710148 [details] [diff] [review]
Final patch: Don't remove all observers in signal table when child process is killed, r=echou
Attachment #710069 - Attachment is obsolete: true

Comment 5

6 years ago
Try run for c6257978d3cb is complete.
Detailed breakdown of the results available here:
Results (out of 14 total builds):
    success: 14
Builds (or logs if builds failed) available at:

Comment 6

6 years ago
Try run for cf7e0db3ead0 is complete.
Detailed breakdown of the results available here:
Results (out of 18 total builds):
    success: 17
    warnings: 1
Builds (or logs if builds failed) available at:

Comment 8

6 years ago
Last Resolved: 6 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: --- → +
status-b2g18: --- → fixed
status-b2g18-v1.0.0: --- → wontfix
status-b2g18-v1.0.1: --- → wontfix
status-firefox20: --- → wontfix
status-firefox21: --- → fixed
You need to log in before you can comment on or make changes to this bug.