* 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.
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+
Nominate as tef+ Without this patch, the Bluetooth part in Settings app cannot work for scenario in Comment 0.
blocking-b2g: --- → tef?
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
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://email@example.com
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://firstname.lastname@example.org
Status: NEW → RESOLVED
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.