зеркало из https://github.com/mozilla/gecko-dev.git
Bug 835232 - To adjust FM volume should be done after enabling FM functionality. r=jlebar, a=tef+
This commit is contained in:
Родитель
5579b5a07a
Коммит
f44fc1ac52
|
@ -135,10 +135,6 @@ NS_IMETHODIMP FMRadio::Enable(nsIFMRadioSettings *settings)
|
|||
bool canPlay;
|
||||
mAudioChannelAgent->SetVisibilityState(!mHidden);
|
||||
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->GetLowerLimit(&lowerLimit);
|
||||
|
@ -155,6 +151,12 @@ NS_IMETHODIMP FMRadio::Enable(nsIFMRadioSettings *settings)
|
|||
NS_ENSURE_TRUE(audioManager, NS_OK);
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче