[B2G][Email] Device does not vibrate upon receiving an email notification while in sleep mode.

RESOLVED FIXED

Status

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

People

(Reporter: Dean R. Gomez (DeanG), Assigned: Robert Bindar)

Tracking

unspecified
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(b2g-v1.4 affected, b2g-v2.0 affected, b2g-v2.1 affected)

Details

(Whiteboard: [systemsfe], [2.0-flame-test-run-2][p=3], URL)

Attachments

(2 attachments)

(Reporter)

Description

3 years ago
Created attachment 8446089 [details]
Logcat_Open_C_No_Vibration.txt

Description:
If a user receives an email notification while their device is in sleep mode, the device will play a notification sound but will not vibrate until the device awakens.

Prerequisites: Have an email account set up with the 'Check for new messages' set to 5 minutes.

Repro Steps:
1) Update a Flame to 20140618000202
2) Have your device be in sleep mode (ie. pressing the power button when on the homescreen).
3) Send an email to the device through another account online or on another device.
4) Wait 5 minutes.
5) Listen for the notification sound.

Actual:
A notification sound will play but no vibration occurs until the phone is awakened.
Expected:
Device vibrates and makes a notification sound while the device is asleep.

Environmental Variables:
Device: Flame 2.0
Build ID: 20140623000201
Gaia: 729f214b887ce8efe7d870145d31acb2c6427817
Gecko: 117ba3eda4d2
Version: 32.0a2 (2.0) 
Firmware Version: v121-2
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0

Notes: This issue was found while doing exploratory testing around test cases in the Email suite.

Repro frequency: 8/8
See attached: Logcat_Open_C_No_Vibration.txt, Video: http://youtu.be/7mcDSylPKK4
(Reporter)

Comment 1

3 years ago
This issue DOES reproduce on Flame 2.1, Buri 2.1, Open_C 2.1, Flame 1.4, Buri 1.4, Open_C 1.4, Open_C 2.0, Buri 1.3, and Open_C 1.3. 

Flame 2.1

2.1 Environmental Variables:
Device: Flame Master
Build ID: 20140625040202
Gaia: 57da30f405ba37a5d4844f32bb292271b81faee2
Gecko: a19e0434ea52
Version: 33.0a1 (Master)
Firmware Version: v121-2
User Agent: Mozilla/5.0 (Mobile; rv:33.0) Gecko/33.0 Firefox/33.0


Buri 2.1

2.1 Environmental Variables:
Device: Buri Master
Build ID: 20140625040202
Gaia: 57da30f405ba37a5d4844f32bb292271b81faee2
Gecko: a19e0434ea52
Version: 33.0a1 (Master)
Firmware Version: v1.2device.cfg
User Agent: Mozilla/5.0 (Mobile; rv:33.0) Gecko/33.0 Firefox/33.0


Open_C 2.1

2.1 Environmental Variables:
Device: Open_C Master
Build ID: 20140625040202
Gaia: 57da30f405ba37a5d4844f32bb292271b81faee2
Gecko: a19e0434ea52
Version: 33.0a1 (Master)
Firmware Version: P821A10V1.0.0B06_LOG_DL
User Agent: Mozilla/5.0 (Mobile; rv:33.0) Gecko/33.0 Firefox/33.0


Flame 1.4

1.4F Environmental Variables:
Device: Flame 1.4
Build ID: 20140625000201
Gaia: c9416de14acf9e94ab006619cd2418c768422fcb
Gecko: cddf88f78632
Version: 30.0 (1.4)
Firmware Version: v121-2
User Agent: Mozilla/5.0 (Mobile; rv:30.0) Gecko/30.0 Firefox/30.0


Buri 1.4

1.4 Environmental Variables:
Device: Buri 1.4
Build ID: 20140612063006
Gaia: 80bf1039c6ce8bcde57ce06ecb09e40c18c538c6
Gecko: 39b6237907d9
Version: 30.0 (1.4) 
Firmware Version: v1.2device.cfg
User Agent: Mozilla/5.0 (Mobile; rv:30.0) Gecko/30.0 Firefox/30.0


Open_C 1.4

1.4 Environmental Variables:
Device: Open_C 1.4
Build ID: 20140625000201
Gaia: c9416de14acf9e94ab006619cd2418c768422fcb
Gecko: cddf88f78632
Version: 30.0 (1.4)
Firmware Version: P821A10V1.0.0B06_LOG_DL
User Agent: Mozilla/5.0 (Mobile; rv:30.0) Gecko/30.0 Firefox/30.0


Open_C 2.0

2.0 Environmental Variables:
Device: Open_C 2.0
Build ID: 20140625000201
Gaia: de77f794db22a45f9d575de2c6e266a30a50de3b
Gecko: 79712bd7b60d
Version: 32.0a2 (2.0)
Firmware Version: P821A10V1.0.0B06_LOG_DL
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0 


Buri 1.3

1.3 Environmental Variables:
Device: Buri 1.3
Build ID: 20140625024001
Gaia: 7a25ded52cf1164196098545be4fa7d5111fd526
Gecko: 8ef1dadd6278
Version: 28.0 (1.3)
Firmware Version: v1.2device.cfg
User Agent: Mozilla/5.0 (Mobile; rv:28.0) Gecko/28.0 Firefox/28.0


Open_C 1.3

1.3 Environmental Variables:
Device: Open_C 1.3
BuildID: 20140505052400
Gaia: Unknown Git commit; build date shown here.
Gecko:
Version: 28.0
Firmware Version: P821A10V1.0.0B06_LOG_DL
User Agent: Mozilla/5.0 (Mobile; rv:28.0) Gecko/28.0 Firefox/28.0


Actual Result: While the screen is in sleep mode, a notification sound plays when an email is received but the vibration does not occur until the device awakens.  

*NOTE: On Buri 1.3 and Open_C 1.3, a notification does not appear; No sound, no vibration, and no visual description of the received message.
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
The Buri 1.3 and Open_C 1.3 devices should have been noted separately that the issue cannot be checked because the user does not receive any sort of notification at all while the device is in sleep mode. 

Please re-comment your regression checks and change the 1.3 tracking flag.
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage-]
Flags: needinfo?(ktucker)
Flags: needinfo?(dgomez)
(Reporter)

Comment 3

3 years ago
Correction, please ignore comment 1.

This issue DOES reproduce on Flame 2.1, Buri 2.1, Open_C 2.1, Flame 1.4, Buri 1.4, Open_C 1.4, Buri 2.0 and Open_C 2.0. 


Flame 2.1

2.1 Environmental Variables:
Device: Flame Master
Build ID: 20140625040202
Gaia: 57da30f405ba37a5d4844f32bb292271b81faee2
Gecko: a19e0434ea52
Version: 33.0a1 (Master)
Firmware Version: v121-2
User Agent: Mozilla/5.0 (Mobile; rv:33.0) Gecko/33.0 Firefox/33.0


Buri 2.1

2.1 Environmental Variables:
Device: Buri Master
Build ID: 20140625040202
Gaia: 57da30f405ba37a5d4844f32bb292271b81faee2
Gecko: a19e0434ea52
Version: 33.0a1 (Master)
Firmware Version: v1.2device.cfg
User Agent: Mozilla/5.0 (Mobile; rv:33.0) Gecko/33.0 Firefox/33.0


Open_C 2.1

2.1 Environmental Variables:
Device: Open_C Master
Build ID: 20140625040202
Gaia: 57da30f405ba37a5d4844f32bb292271b81faee2
Gecko: a19e0434ea52
Version: 33.0a1 (Master)
Firmware Version: P821A10V1.0.0B06_LOG_DL
User Agent: Mozilla/5.0 (Mobile; rv:33.0) Gecko/33.0 Firefox/33.0


Flame 1.4

1.4F Environmental Variables:
Device: Flame 1.4
Build ID: 20140625000201
Gaia: c9416de14acf9e94ab006619cd2418c768422fcb
Gecko: cddf88f78632
Version: 30.0 (1.4)
Firmware Version: v121-2
User Agent: Mozilla/5.0 (Mobile; rv:30.0) Gecko/30.0 Firefox/30.0


Buri 1.4

1.4 Environmental Variables:
Device: Buri 1.4
Build ID: 20140612063006
Gaia: 80bf1039c6ce8bcde57ce06ecb09e40c18c538c6
Gecko: 39b6237907d9
Version: 30.0 (1.4) 
Firmware Version: v1.2device.cfg
User Agent: Mozilla/5.0 (Mobile; rv:30.0) Gecko/30.0 Firefox/30.0


Open_C 1.4

1.4 Environmental Variables:
Device: Open_C 1.4
Build ID: 20140625000201
Gaia: c9416de14acf9e94ab006619cd2418c768422fcb
Gecko: cddf88f78632
Version: 30.0 (1.4)
Firmware Version: P821A10V1.0.0B06_LOG_DL
User Agent: Mozilla/5.0 (Mobile; rv:30.0) Gecko/30.0 Firefox/30.0


Buri 2.0

2.0 Environmental Variables:
Device: Buri 2.0
Build ID: 20140625000201
Gaia: de77f794db22a45f9d575de2c6e266a30a50de3b
Gecko: 79712bd7b60d
Version: 32.0a2 (2.0)
Firmware Version: v1.2device.cfg
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0 


Open_C 2.0

2.0 Environmental Variables:
Device: Open_C 2.0
Build ID: 20140625000201
Gaia: de77f794db22a45f9d575de2c6e266a30a50de3b
Gecko: 79712bd7b60d
Version: 32.0a2 (2.0)
Firmware Version: P821A10V1.0.0B06_LOG_DL
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0 


Actual Result: While the screen is in sleep mode, a notification sound plays when an email is received but the vibration does not occur until the device awakens.  

-------------------------------------------------------------------------------------------------------

Could not check against Buri 1.3 and Open_C 1.3 as the user does not receive any email notifications while in sleep mode.


Buri 1.3

1.3 Environmental Variables:
Device: Buri 1.3
Build ID: 20140625024001
Gaia: 7a25ded52cf1164196098545be4fa7d5111fd526
Gecko: 8ef1dadd6278
Version: 28.0 (1.3)
Firmware Version: v1.2device.cfg
User Agent: Mozilla/5.0 (Mobile; rv:28.0) Gecko/28.0 Firefox/28.0


Open_C 1.3

1.3 Environmental Variables:
Device: Open_C 1.3
BuildID: 20140505052400
Gaia: Unknown Git commit; build date shown here.
Gecko:
Version: 28.0
Firmware Version: P821A10V1.0.0B06_LOG_DL
User Agent: Mozilla/5.0 (Mobile; rv:28.0) Gecko/28.0 Firefox/28.0
status-b2g-v1.3: affected → ---
Flags: needinfo?(dgomez) → needinfo?(ktucker)
(Reporter)

Comment 4

3 years ago
Open C logcat was attached due to Flame logcats still being affected by Bug 1010993.
QA Whiteboard: [QAnalyst-Triage-] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker)
I do not believe this is an email app issue, but rather perhaps a system or settings app issue. It could be an issue with the system app related to email, as I believe it has an email-specific notification path.

However, email just triggers a notification, and email is not capable itself of controlling the sound or vibration of an individual notification. So asking systemsfe to consider the bug.
Component: Gaia::E-Mail → Gaia::System
Whiteboard: [2.0-flame-test-run-2] → [systemsfe], [2.0-flame-test-run-2]

Updated

3 years ago
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage+][lead-review+]
Robert is going to look into this one.
Assignee: nobody → robertbindar
Whiteboard: [systemsfe], [2.0-flame-test-run-2] → [systemsfe], [2.0-flame-test-run-2][p=3]
(Assignee)

Comment 7

3 years ago
I checked the system app code and it seems like the notification is behaving as expected (an event listener is registered to vibrate the phone upon awake, maybe because the current vibration api specifies that hidden documents cannot start or stop a vibration).

I consulted the UX team and apparently they belive we should deactivate the vibration for email notifications when asleep (i.e. when the phone awakes); a similar bug can be found here bug 915236.
(Assignee)

Comment 8

3 years ago
Created attachment 8452063 [details] [review]
disable_email_vibration
Attachment #8452063 - Flags: review?(mhenretty)
Comment on attachment 8452063 [details] [review]
disable_email_vibration

Looking great for a first pass!

What happens for the case when the phone is not asleep, but the email application is still running in the background? I think before your patch the phone would indeed vibrate, and we need to preserve that behavior.

Also, we should add at least one test for this fix, either unit or integration. This test should fail without your fix, and pass with your fix. For more information about these tests, have a look here:

https://github.com/mozilla-b2g/gaia/#tests
Attachment #8452063 - Flags: review?(mhenretty)
Robert, after speaking with you on IRC, I think your solution does indeed work. Now we just need a test :)
(Assignee)

Comment 11

3 years ago
Comment on attachment 8452063 [details] [review]
disable_email_vibration

I added the test and tested the change on a Flame device.
Attachment #8452063 - Flags: review?(mhenretty)
Comment on attachment 8452063 [details] [review]
disable_email_vibration

Spoke with Robert about this on IRC, we are going to do some more investigation work on this problem. We might have some deeper issues we need to solve rather than working around the problem in notification.js.
Attachment #8452063 - Flags: review?(mhenretty)
(Assignee)

Updated

3 years ago
Attachment #8452063 - Flags: review?(mhenretty)
Comment on attachment 8452063 [details] [review]
disable_email_vibration

Awesome! This is indeed testing the fixed functionality. I left a few comments on github to restructure things a little, but other than that we are good to go. Reflag me when you address my comments. Good job!
Attachment #8452063 - Flags: review?(mhenretty)
(Assignee)

Comment 14

3 years ago
Comment on attachment 8452063 [details] [review]
disable_email_vibration

I fixed the nits and refactored the code as you suggested on github.
Attachment #8452063 - Flags: review?(mhenretty)
Comment on attachment 8452063 [details] [review]
disable_email_vibration

All righty, I think this is just about ready for the big time. I left a couple of nits on github, and please change your commit message to read "Bug - 1030310 disable vibration for email notification when the phone is asleep".
Attachment #8452063 - Flags: review?(mhenretty) → review+
master: https://github.com/mozilla-b2g/gaia/commit/19e9536e5825e736ac52d46607cc6397830b5997
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.