Closed Bug 1201364 Opened 9 years ago Closed 9 years ago

Alarm should automatically stop after a given period of time even user doesn't press the stop button

Categories

(Firefox OS Graveyard :: Gaia::Clock, defect, P2)

defect

Tracking

(blocking-b2g:2.5+)

RESOLVED FIXED
blocking-b2g 2.5+

People

(Reporter: hsinyi, Assigned: mcav)

Details

(Keywords: foxfood, Whiteboard: [bzlite])

Attachments

(4 files, 1 obsolete file)

User-Agent: Mozilla/5.0 (Mobile; rv:43.0) Gecko/43.0 Firefox/43.0

Expected behavior:
Alarm should automatically stop after a given period of time even user doesn't press the stop button.

Actual behavior:
Alarm keeps ringing or vibrating until the device runs out of battery.
Attached file dev-log-main.log
Attached file properties.log
Attached image screenshot.png (obsolete) —
Comment on attachment 8656354 [details]
screenshot.png

The screenshot doesn’t provide any helpful information.
Attachment #8656354 - Attachment is obsolete: true
Marcus, 
Copying you, as you are looking into Alarm defects.

Thanks
blocking-b2g: --- → 2.5+
QA Whiteboard: [foxfood-triage]
Component: Gaia::Feedback → Gaia::Clock
Priority: -- → P2
Assignee: nobody → m
Attachment #8672801 - Flags: review?(bugmail)
Comment on attachment 8672801 [details] [review]
[gaia] mcav:clock-silence > mozilla-b2g:master

Here's my understanding of the patch:

- Driving change: The alarm automatically silences itself after 10 minutes now.  This does not close the alert screen, it merely stops the ringtone player and any vibration.  This is the same behavior as when an incoming call interrupts the alarm.  The alert screen will continue to be displayed on the screen, so when the user eventually wakes up / returns to their desk they will know they overslept / co-workers were justified in yelling at them.

- The screen continues to only remain active for 10 minutes.  (And the constant was reformatted to make the number of minutes more obvious.)

- The setTimeout goes away one of three ways:
  - The user hits snooze/close on their own, triggering window.close(), causing the setTimeout callback to evaporate.
  - The timeout fires on its own, obviously going away.
  - The alert window is reused, in which case clearTimeout is used.  Reuse is the only situation where we would fear the timeout interacting with another alarm, so this is good and happy.

- There is no world in which the acquisition of the releaseWakeLock would take longer than 10 minutes wall clock, so the data dependency should not race.  And if it did, releaseWakeLock already has a sentinel empty function.
Attachment #8672801 - Flags: review?(bugmail) → review+
Flawless analysis. Thanks!

master: https://github.com/mozilla-b2g/gaia/commit/8c2eb2f5e82177b5cff3654e9c661eacd63a7e6c
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: