mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 868960 - [FMRadio] FM Radio volume is not updated by headset ejecting. r=mwu
This commit is contained in:
parent
210edab1cd
commit
36abc5d8ba
@ -199,8 +199,7 @@ public:
|
||||
};
|
||||
|
||||
AudioManager::AudioManager() : mPhoneState(PHONE_STATE_CURRENT),
|
||||
mObserver(new HeadphoneSwitchObserver()),
|
||||
mFMChannelIsMuted(0)
|
||||
mObserver(new HeadphoneSwitchObserver())
|
||||
{
|
||||
RegisterSwitchObserver(SWITCH_HEADPHONES, mObserver);
|
||||
|
||||
@ -423,12 +422,8 @@ AudioManager::SetStreamVolumeIndex(int32_t aStream, int32_t aIndex) {
|
||||
status_t status =
|
||||
AudioSystem::setStreamVolumeIndex(static_cast<audio_stream_type_t>(aStream), aIndex);
|
||||
|
||||
// sync the fm stream volume with music volume, except set fm volume by audioChannelServices
|
||||
if (aStream == AUDIO_STREAM_FM && IsDeviceOn(AUDIO_DEVICE_OUT_FM)) {
|
||||
mFMChannelIsMuted = aIndex == 0;
|
||||
}
|
||||
// sync fm volume with music stream type
|
||||
if (aStream == AUDIO_STREAM_MUSIC && IsDeviceOn(AUDIO_DEVICE_OUT_FM) && !mFMChannelIsMuted) {
|
||||
if (aStream == AUDIO_STREAM_MUSIC && IsDeviceOn(AUDIO_DEVICE_OUT_FM)) {
|
||||
AudioSystem::setStreamVolumeIndex(static_cast<audio_stream_type_t>(AUDIO_STREAM_FM), aIndex);
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,6 @@ protected:
|
||||
private:
|
||||
nsAutoPtr<mozilla::hal::SwitchObserver> mObserver;
|
||||
nsCOMPtr<AudioChannelAgent> mPhoneAudioAgent;
|
||||
bool mFMChannelIsMuted;
|
||||
};
|
||||
|
||||
} /* namespace gonk */
|
||||
|
Loading…
Reference in New Issue
Block a user