Bug 835232 - To adjust FM volume should be done after enabling FM functionality. r=jlebar, a=tef+

This commit is contained in:
Marco Chen 2013-02-19 11:19:53 +08:00
Родитель 5579b5a07a
Коммит f44fc1ac52
1 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -135,10 +135,6 @@ NS_IMETHODIMP FMRadio::Enable(nsIFMRadioSettings *settings)
bool canPlay; bool canPlay;
mAudioChannelAgent->SetVisibilityState(!mHidden); mAudioChannelAgent->SetVisibilityState(!mHidden);
mAudioChannelAgent->StartPlaying(&canPlay); mAudioChannelAgent->StartPlaying(&canPlay);
// We enable the hardware, but mute the audio stream, in order to
// simplify state handling. This is simpler but worse for battery
// life; followup is bug 820282.
CanPlayChanged(canPlay);
settings->GetUpperLimit(&upperLimit); settings->GetUpperLimit(&upperLimit);
settings->GetLowerLimit(&lowerLimit); settings->GetLowerLimit(&lowerLimit);
@ -155,6 +151,12 @@ NS_IMETHODIMP FMRadio::Enable(nsIFMRadioSettings *settings)
NS_ENSURE_TRUE(audioManager, NS_OK); NS_ENSURE_TRUE(audioManager, NS_OK);
audioManager->SetFmRadioAudioEnabled(true); audioManager->SetFmRadioAudioEnabled(true);
// We enable the hardware, but mute the audio stream, in order to
// simplify state handling. This is simpler but worse for battery
// life; followup is bug 820282.
// Note: To adjust FM volume is only available after setting up
// routing patch.
CanPlayChanged(canPlay);
return NS_OK; return NS_OK;
} }