[Bluetooth]Bluetooth transfer request will disappear after we lock screen.

RESOLVED FIXED

Status

Firefox OS
Gaia::System::System UI
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: Verson Xiong (Leave from Mozilla), Assigned: gasolin@mozilla.com)

Tracking

unspecified
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(b2g-v2.2 affected, b2g-master verified)

Details

(Whiteboard: [v2.2-nexus-5-l])

Attachments

(3 attachments)

(Reporter)

Description

3 years ago
Created attachment 8624664 [details]
video_0700.3gp

[1.Description]:
[Flame v2.2 & v3.0][Nexus5 v2.2 & v3.0][Bluetooth]When user receives a transfer request and review it, after we lock screen, transfer request will disappear, and user can't find the request by any means even sender is sending the file.
Found time:07:00
See Attachment:logcat_0700.txt & video_0700.mp4

[2.Testing Steps]: 
1. Open settings -> bluetooth.
2. Turn on bluetooth and pair with other device.
3. Send a file to DUT.
4. Review the request.
5. Press power button twice and unlock device.

[3.Expected Result]: 
5. Transfer request dialog does not disappear and user can find it from notifacation bar.

[4.Actual Result]: 
5. Transfer requst disappears and user can't find it again. 

[5.Reproduction build]: 
Device: Flame 2.2 (affected)
Build ID               20150618002507
Gaia Revision          3414b07dc489976bf510fd8042c0af3b1192c160
Gaia Date              2015-06-16 22:04:56
Gecko Revision         https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/a2db74491088
Gecko Version          37.0
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150618.035510
Firmware Date          Thu Jun 18 03:55:22 EDT 2015
Bootloader             L1TC000118D0

Device: Flame 3.0 (affected)
Build ID               20150618010201
Gaia Revision          b404c41c5471c31610e64defb74ec066b411e724
Gaia Date              2015-06-17 17:01:15
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/a3f280b6f8d5
Gecko Version          41.0a1
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150618.043514
Firmware Date          Thu Jun 18 04:35:26 EDT 2015
Bootloader             L1TC000118D0

Device: Nexus5 2.2 (affected)
Build ID               20150618002507
Gaia Revision          3414b07dc489976bf510fd8042c0af3b1192c160
Gaia Date              2015-06-16 22:04:56
Gecko Revision         https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/a2db74491088
Gecko Version          37.0
Device Name            hammerhead
Firmware(Release)      5.1
Firmware(Incremental)  eng.cltbld.20150618.034835
Firmware Date          Thu Jun 18 03:48:52 EDT 2015
Bootloader             HHZ12f

Device: Nexus5 3.0 (affected)
Build ID               20150618160206
Gaia Revision          55bac3c151bff4f0ce0e8715962c4676fefb0887
Gaia Date              2015-06-18 16:49:24
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/656ea3bfbb4e
Gecko Version          41.0a1
Device Name            hammerhead
Firmware(Release)      5.1
Firmware(Incremental)  eng.cltbld.20150618.192142
Firmware Date          Thu Jun 18 19:22:00 EDT 2015
Bootloader             HHZ12f

[6.Reproduction Frequency]: 
Always Recurrence,5/5

[7.TCID]: 
Free Test
(Reporter)

Comment 1

3 years ago
Created attachment 8624665 [details]
logcat_0700.txt
(Reporter)

Updated

3 years ago
status-b2g-v2.2: --- → affected
status-b2g-master: --- → affected
Teri, could you take a look?
Flags: needinfo?(twen)

Comment 3

3 years ago
I can recreate this on the latest v2.2. The key is to tap open the BT request before lock screen. After unlocking screen, BT request is gone.

Hi Ben, Can you help find someone to take a look at this bug?


Gaia-Rev        0179935627012dfde3ca036c9a71035be463b7ad
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/35e09270da3a
Build-ID        20150628002505
Version         37.0
Device-Name     flame
FW-Release      4.4.2
FW-Incremental  eng.cltbld.20150628.035537
FW-Date         Sun Jun 28 03:55:48 EDT 2015
Bootloader      L1TC000118D0
Flags: needinfo?(twen) → needinfo?(btian)

Comment 4

3 years ago
ni? gaia devs.

Arthur/Ian/Fred, please help check why gaia receives confirmation notification but doesn't keep it after device suspends (as symptom video in comment 0).
Flags: needinfo?(iliu)
Flags: needinfo?(gasolin)
Flags: needinfo?(btian)
Flags: needinfo?(arthur.chen)
(Assignee)

Comment 5

3 years ago
I believe its an aged known issue of permission manager.

We might need cache the permission event when visibility changed, and emit again when we refocused.
Assignee: nobody → gasolin
Flags: needinfo?(iliu)
Flags: needinfo?(gasolin)
Flags: needinfo?(arthur.chen)

Comment 6

3 years ago
Fred, can we duplicate this bug with existing bug to track?
Flags: needinfo?(gasolin)
(Assignee)

Comment 7

3 years ago
After some thought I think this particular case (BT transfer request) might be better `refuse` the request when screenlock. Since user is inactive for a while (so phone goes to lockscreen) and we can't make sure the BT transfer request is still valid from the requester side.

@harly could you help finding UX to clarify this case?
Flags: needinfo?(gasolin) → needinfo?(hhsu)

Comment 8

3 years ago
Personally, I think it would be better to have the transfer request dialog remains as where it is when user unlock the screen from inactive state, because there are many possibilities as to why user enters the inactive state, and it always make user feels safer to see the last screen when unlock the phone. Nevertheless, we can add a timeout time to the transfer request dialog when it is in inactive state and system will 'refuse' the request and close the dialog.
Flags: needinfo?(hhsu)
(Assignee)

Comment 9

3 years ago
I miss understand this bug in comment 5, Its not related to permission manager, but related to system showCustomDialog. Will find why `hideCustomDialog` is called when screen locked.
Status: NEW → ASSIGNED
Per comment 9, I suspect some refactor work to change default behaviour for CustomDialog while the screen is changed to be locked.
(Assignee)

Comment 11

3 years ago
test with soundManager showCEWarningDialog (a warning dialog to tell user that the volume may hurt his/her ear) which also use CustomDialog, it shows the same behavior.
Component: Bluetooth → Gaia::System::Window Mgmt
(Assignee)

Comment 12

3 years ago
The root cause is the update manager tend to close any custom dialogs when everytime lockscreen is opened.

https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/update_manager.js#L769
Component: Gaia::System::Window Mgmt → Gaia::System::System UI
Depends on: 1094759
Created attachment 8632705 [details] [review]
[gaia] gasolin:issue-1176185 > mozilla-b2g:master
(Assignee)

Comment 14

3 years ago
Comment on attachment 8632705 [details] [review]
[gaia] gasolin:issue-1176185 > mozilla-b2g:master

currently update manager always request `hideCustomDialog` when lockscreen is on, which will accidentally close CustomDialog which other system modules uses (Bluetooth transfer dialog, Sound Manager...as above comments).

Adding _hasDialog property to check if update_manager has opened dialog (4 places to create new custom dialog). If there's no update manager related dialog, the hideCustomDialog wont be called.
Attachment #8632705 - Flags: review?(etienne)
Comment on attachment 8632705 [details] [review]
[gaia] gasolin:issue-1176185 > mozilla-b2g:master

Ahah, nice debugging!

The code change looks good, but can you add a couple of unit tests in update_manager_test.js where we spy on Service.request and check that hideCustomDialog is called in one case and not the other (when we dispatch a lockscreen-appoened)?

Note: don't want to manually set |_hasDialog| from the tests, too internal, even if the rest of the test file is far from perfect. I'd rather call |UpdateManager.showDownloadPrompt();| instead to get into the state where we have a dialog.

Thanks!
Attachment #8632705 - Flags: review?(etienne)
(Assignee)

Comment 16

3 years ago
Comment on attachment 8632705 [details] [review]
[gaia] gasolin:issue-1176185 > mozilla-b2g:master

added test cases, please kindly review it again
Attachment #8632705 - Flags: review?(etienne)
Comment on attachment 8632705 [details] [review]
[gaia] gasolin:issue-1176185 > mozilla-b2g:master

Awesome! Thanks!
Attachment #8632705 - Flags: review?(etienne) → review+
(Assignee)

Comment 18

3 years ago
merged https://github.com/mozilla-b2g/gaia/commit/8eb803ddff7ab8f8f272d23ecbed8397a57e955d

thanks!
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
(Reporter)

Comment 19

3 years ago
Per conmmet 18
This bug has been verified as "pass" on latest build of Flame master ,Nexus5 master by the STR in comment 0.

Actually result: User can find transfer request dialog after unlock screen.
Reproduce rate: 0/10

Device: Flame master (pass):
Build ID               20150721160205
Gaia Revision          84c3bf622e211046d905803b34de5d331761f22d
Gaia Date              2015-07-21 16:28:35
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/1875a5584e5f
Gecko Version          42.0a1
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150721.193449
Firmware Date          Tue Jul 21 19:35:02 EDT 2015
Bootloader             L1TC000118D0

Device: Nexus5 master (pass):
Build ID               20150721160205
Gaia Revision          84c3bf622e211046d905803b34de5d331761f22d
Gaia Date              2015-07-21 16:28:35
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/1875a5584e5f
Gecko Version          42.0a1
Device Name            hammerhead
Firmware(Release)      5.1
Firmware(Incremental)  eng.cltbld.20150721.211608
Firmware Date          Tue Jul 21 21:16:23 EDT 2015
Bootloader             HHZ12f
QA Whiteboard: [MGSEI-Triage+]
status-b2g-master: affected → verified
You need to log in before you can comment on or make changes to this bug.