Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Revert "Merge pull request #6816 from ian-liu/clock/Bug814632_silent_…
Browse files Browse the repository at this point in the history
…alarm_screen_underneath_call_screen"

This reverts commit df38f79, reversing
changes made to 1734754.
  • Loading branch information
timdream committed Dec 7, 2012
1 parent 69bbfcf commit b866237
Showing 1 changed file with 7 additions and 20 deletions.
27 changes: 7 additions & 20 deletions apps/clock/js/onring.js
Expand Up @@ -36,14 +36,9 @@ var RingView = {
init: function rv_init() {
this.setAlarmTime();
this.setAlarmLabel();
// If mozHidden is true in init state,
// it means that alarm screen underneath the oncall screen.
// Don't let the alarm ring and vibrate.
if (!document.mozHidden) {
this.setWakeLockEnabled(true);
this.ring();
this.vibrate();
}
this.setWakeLockEnabled(true);
this.ring();
this.vibrate();
document.addEventListener('mozvisibilitychange', this);
this.snoozeButton.addEventListener('click', this);
this.closeButton.addEventListener('click', this);
Expand Down Expand Up @@ -112,22 +107,14 @@ var RingView = {
stopAlarmNotification: function rv_stopAlarmNotification(action) {
switch (action) {
case 'ring':
if (this._ringtonePlayer)
this._ringtonePlayer.pause();

this._ringtonePlayer.pause();
break;
case 'vibrate':
if (this._vibrateInterval)
window.clearInterval(this._vibrateInterval);

window.clearInterval(this._vibrateInterval);
break;
default:
if (this._ringtonePlayer)
this._ringtonePlayer.pause();

if (this._vibrateInterval)
window.clearInterval(this._vibrateInterval);

this._ringtonePlayer.pause();
window.clearInterval(this._vibrateInterval);
break;
}
this.setWakeLockEnabled(false);
Expand Down

0 comments on commit b866237

Please sign in to comment.