B2G/gaia/apps/system/js/sound_manager.js
/**
   * Leaving silent mode.
   * @param  {String} channel Specify the channel name.
   *                          which is going to enter silent mode.
   * @param  {Boolean} skip_restore Specify to skip the volume restore or not.
   */
Leaving silent mode.
@param  {String} channel Specify the channel name.
which is going to enter silent mode.
@param  {Boolean} skip_restore Specify to skip the volume restore or not.
Leaving silent mode . @param { String } channel Specify the channel name . which is going to enter silent mode . @param { Boolean } skip_restore Specify to skip the volume restore or not .
function leaveSilentMode(channel, skip_restore) {
    if (!channel)
      channel = 'content';
    if (!skip_restore &&
        (cachedVolume[channel] > 0 || currentVolume[channel] == 0)) {
      var req;
      var settingObject = {};
      settingObject['audio.volume.' + channel] =
        (cachedVolume[channel] > 0) ? cachedVolume[channel] : 1;
      pendingRequestCount++;
      req = SettingsListener.getSettingsLock().set(settingObject);
      req.onsuccess = function onSuccess() {
        pendingRequestCount--;
      };
      req.onerror = function onError() {
        pendingRequestCount--;
      };
    }
    cachedVolume[channel] = -1;
  }
function leaveSilentMode ( channel , skip_restore ) { if ( ! channel ) channel = 'content' ; if ( ! skip_restore && ( cachedVolume [ channel ] > 0 || currentVolume [ channel ] == 0 ) ) { var req ; var settingObject = { } ; settingObject [ 'audio.volume.' + channel ] = ( cachedVolume [ channel ] > 0 ) ? cachedVolume [ channel ] : 1 ; pendingRequestCount ++ ; req = SettingsListener . getSettingsLock ( ) . set ( settingObject ) ; req . onsuccess = function onSuccess ( ) { pendingRequestCount -- ; } ; req . onerror = function onError ( ) { pendingRequestCount -- ; } ; } cachedVolume [ channel ] = - 1 ; }
Leaving silent mode.
Leaving silent mode .
// We're leaving silent mode. // At least rollback to 1, // otherwise we don't really leave silent mode.