Closed Bug 996092 Opened 10 years ago Closed 6 years ago

[Clock] Use hardware buttons to dismiss/mute alarms

Categories

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

x86
macOS
defect
Not set
normal

Tracking

(tracking-b2g:+)

RESOLVED WONTFIX
tracking-b2g +

People

(Reporter: mcav, Unassigned)

References

Details

(Whiteboard: [p=13] [g+])

Attachments

(1 file)

This bug tracks a patch that will address bug 812692, bug 900371, and bug 817489 all at once, since their goals are closely related.

As explained in ring_view.js, when an alarm rings, the alert screen should react to hardware buttons appropriately. The spec as provided by Juwei reads as follows:

 * - If the user does nothing for 1 minute (SCREEN_ON_DURATION), the
 *   screen falls asleep but the timer/alarm keep ringing.
 *
 * - If the user does nothing for 15 minutes (AUDIBLE_DURATION), or a
 *   call comes in, the timer and alarm silence themselves, but they
 *   still will show up when the user looks at the phone again.
 *
 * - If the user presses home or sleep, the alarm goes into "snooze"
 *   mode, or the timer closes.
 *
 * - If the user presses the volume button, all sounds stop, and if
 *   it's an alarm, the alarm goes into "snooze" mode.
This patch primarily touches RingView and the audio_manager, which was simplified and renamed to audio_player.
Assignee: nobody → m
Status: NEW → ASSIGNED
Attachment #8406269 - Flags: review?(mmedeiros)
Target Milestone: --- → 1.4 S6 (25apr)
Depends on: 812692, 900371, 817489
Blocks: 812692, 817489, 900371
No longer depends on: 812692, 817489, 900371
Whiteboard: [p=13]
Comment on attachment 8406269 [details]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/18198

Canceling review until I can get Travis to pass. It passed locally, which is why I didn't wait to set the review flag first. Sorry bout that.
Attachment #8406269 - Flags: review?(mmedeiros)
Comment on attachment 8406269 [details]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/18198

Rebased and Travis passes, ready for your purview.
Attachment #8406269 - Flags: review?(mmedeiros)
Comment on attachment 8406269 [details]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/18198

added a few notes on Github. complexity increased a little bit since now there is way more logic involved, but overall it's looking good to me. will just wait mcav to explain and/or update patch to r+ it.
Attachment #8406269 - Flags: review?(mmedeiros)
Comment on attachment 8406269 [details]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/18198

I've updated the patch with your feedback and corrections. I haven't waited for Travis to pass yet, but will need to squash anyway before landing.
Attachment #8406269 - Flags: review?(mmedeiros)
Comment on attachment 8406269 [details]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/18198

nice work!
Attachment #8406269 - Flags: review?(mmedeiros) → review+
Thanks!

master: https://github.com/mozilla-b2g/gaia/commit/ea42223ccd6a406d8214978fc635f4bd12f1ff33
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Backing out to address an intermittent failure.

https://github.com/mozilla-b2g/gaia/commit/8a2d72e3d14119ce9e3091f55e5674aa1160d0f9
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
 1) Alarm and Timer Firing Dismiss a timer with "interrupt":

AssertionError: false == true

at /home/travis/build/mozilla-b2g/gaia/apps/clock/test/marionette/firing_test.js:135:16

at Object.ClockAppActions.withSystemFrame (/home/travis/build/mozilla-b2g/gaia/apps/clock/test/marionette/lib/actions.js:44:15)

at assertSilenced (/home/travis/build/mozilla-b2g/gaia/apps/clock/test/marionette/firing_test.js:134:15)

at Context.<anonymous> (/home/travis/build/mozilla-b2g/gaia/apps/clock/test/marionette/firing_test.js:179:11)

at Test.Runnable.run (/home/travis/build/mozilla-b2g/gaia/node_modules/mocha/lib/runnable.js:211:32)

at Runner.runTest (/home/travis/build/mozilla-b2g/gaia/node_modules/mocha/lib/runner.js:372:10)

at /home/travis/build/mozilla-b2g/gaia/node_modules/mocha/lib/runner.js:448:12

at next (/home/travis/build/mozilla-b2g/gaia/node_modules/mocha/lib/runner.js:297:14)

at /home/travis/build/mozilla-b2g/gaia/node_modules/mocha/lib/runner.js:307:7

at next (/home/travis/build/mozilla-b2g/gaia/node_modules/mocha/lib/runner.js:245:23)

at /home/travis/build/mozilla-b2g/gaia/node_modules/mocha/lib/runner.js:269:7

at Hook.Runnable.run (/home/travis/build/mozilla-b2g/gaia/node_modules/mocha/lib/runnable.js:213:5)

at next (/home/travis/build/mozilla-b2g/gaia/node_modules/mocha/lib/runner.js:257:10)

at /home/travis/build/mozilla-b2g/gaia/node_modules/mocha/lib/runner.js:269:7

at done (/home/travis/build/mozilla-b2g/gaia/node_modules/mocha/lib/runnable.js:185:5)

at /home/travis/build/mozilla-b2g/gaia/node_modules/mocha/lib/runnable.js:197:9

at Object.executeHook (/home/travis/build/mozilla-b2g/gaia/node_modules/marionette-client/lib/marionette/client.js:370:18)

at process._tickCallback (node.js:415:13)
I was about to visit this bug :)
You're too slow this time, batman!
Target Milestone: 1.4 S6 (25apr) → 2.0 S1 (9may)
Target Milestone: 2.0 S1 (9may) → 2.0 S2 (23may)
Whiteboard: [p=13] → [p=13] [g+]
Target Milestone: 2.0 S2 (23may) → 2.0 S3 (6june)
Target Milestone: 2.0 S3 (6june) → 2.0 S4 (20june)
Target Milestone: 2.0 S4 (20june) → 2.0 S5 (4july)
Target Milestone: 2.0 S5 (4july) → ---
This patch will need to be reworked now that full-on hardware button press events are being forwarded. There was a dev-gaia message about this recently.
Status: REOPENED → NEW
Cleanup: unassigning myself from things that I'm not actively working on.
Assignee: m → nobody
Blocks: 1112419
Regarding to fix bug 1112419, we need recall this. Do we continue work on this?
Flags: needinfo?(m)
tracking-b2g: --- → +
Flags: needinfo?(m)
We need to stop alarm when we press the "volume key/home key/power key", see bug1112419 comment 13.
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 10 years ago6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: