mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
Bug 794881 - Phone state to dialing or connected will clear ForceForUse to None. r=philikon
During phone state of dialing or connected and speakerEnabled not set, the AudioManager.ForceForUse(NONE) can't be called or will overrite existing value Ex: BT_SCO during communication mode.
This commit is contained in:
parent
458e5547c7
commit
ff9e704159
@ -940,9 +940,10 @@ RadioInterfaceLayer.prototype = {
|
||||
case nsIRadioInterfaceLayer.CALL_STATE_DIALING: // Fall through...
|
||||
case nsIRadioInterfaceLayer.CALL_STATE_CONNECTED:
|
||||
gAudioManager.phoneState = nsIAudioManager.PHONE_STATE_IN_CALL;
|
||||
let force = this.speakerEnabled ? nsIAudioManager.FORCE_SPEAKER
|
||||
: nsIAudioManager.FORCE_NONE;
|
||||
gAudioManager.setForceForUse(nsIAudioManager.USE_COMMUNICATION, force);
|
||||
if (this.speakerEnabled) {
|
||||
gAudioManager.setForceForUse(nsIAudioManager.USE_COMMUNICATION,
|
||||
nsIAudioManager.FORCE_SPEAKER);
|
||||
}
|
||||
debug("Active call, put audio system into PHONE_STATE_IN_CALL: "
|
||||
+ gAudioManager.phoneState);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user