Bug 749794 - B2G telephony: need to reset audio state when phone call ends. r=philikon

This commit is contained in:
Hsin-Yi Tsai 2012-05-14 21:13:06 -07:00
parent 3bf7e11bd0
commit 595dd855f5

View File

@ -748,6 +748,10 @@ RadioInterfaceLayer.prototype = {
nsIAudioManager.PHONE_STATE_IN_COMMUNICATION : nsIAudioManager.PHONE_STATE_IN_COMMUNICATION :
nsIAudioManager.PHONE_STATE_IN_CALL; //XXX why is this needed? nsIAudioManager.PHONE_STATE_IN_CALL; //XXX why is this needed?
gAudioManager.microphoneMuted = value; gAudioManager.microphoneMuted = value;
if (!this._activeCall) {
gAudioManager.phoneState = nsIAudioManager.PHONE_STATE_NORMAL;
}
}, },
get speakerEnabled() { get speakerEnabled() {
@ -762,6 +766,10 @@ RadioInterfaceLayer.prototype = {
let force = value ? nsIAudioManager.FORCE_SPEAKER : let force = value ? nsIAudioManager.FORCE_SPEAKER :
nsIAudioManager.FORCE_NONE; nsIAudioManager.FORCE_NONE;
gAudioManager.setForceForUse(nsIAudioManager.USE_COMMUNICATION, force); gAudioManager.setForceForUse(nsIAudioManager.USE_COMMUNICATION, force);
if (!this._activeCall) {
gAudioManager.phoneState = nsIAudioManager.PHONE_STATE_NORMAL;
}
}, },
/** /**