Bug 1151499 - Correct the FM playable state. r=baku
authorAlastor Wu <alwu@mozilla.com>
Thu, 23 Apr 2015 19:32:29 +0800
changeset 241395 4a0d3a13905a3dd4e29aeb09d718c8226b2806bc
parent 241394 1a116ac491b2346899a0e80e89f7f3f595b43e88
child 241396 fa789a8875178bb3b1a9ac87f5d0ec58b5cadb8e
push id28659
push userryanvm@gmail.com
push dateTue, 28 Apr 2015 19:18:11 +0000
treeherdermozilla-central@632a55ea8268 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1151499
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1151499 - Correct the FM playable state. r=baku
dom/fmradio/FMRadio.cpp
--- a/dom/fmradio/FMRadio.cpp
+++ b/dom/fmradio/FMRadio.cpp
@@ -499,17 +499,17 @@ FMRadio::EnableAudioChannelAgent()
   SetCanPlay(playingState == AudioChannelState::AUDIO_CHANNEL_STATE_NORMAL);
 
   mAudioChannelAgentEnabled = true;
 }
 
 NS_IMETHODIMP
 FMRadio::CanPlayChanged(int32_t aCanPlay)
 {
-  SetCanPlay(aCanPlay == AudioChannelState::AUDIO_CHANNEL_STATE_NORMAL);
+  SetCanPlay(!(aCanPlay == AudioChannelState::AUDIO_CHANNEL_STATE_MUTED));
   return NS_OK;
 }
 
 NS_IMETHODIMP
 FMRadio::WindowVolumeChanged()
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }