From c6f64baff499fbbdd1d8666e1c98b866387c5c1d Mon Sep 17 00:00:00 2001 From: Hsin-Yi Tsai Date: Wed, 30 Jan 2013 11:16:31 +0800 Subject: [PATCH] Bug 836168 - B2G RIL: update audioPhoneState when rejecting an incoming call. r=allstars.chh --- dom/system/gonk/RadioInterfaceLayer.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dom/system/gonk/RadioInterfaceLayer.js b/dom/system/gonk/RadioInterfaceLayer.js index b6d118ef0b0..6c680d7bd9b 100644 --- a/dom/system/gonk/RadioInterfaceLayer.js +++ b/dom/system/gonk/RadioInterfaceLayer.js @@ -1237,8 +1237,12 @@ RadioInterfaceLayer.prototype = { call.isActive = false; if (this._activeCall && this._activeCall.callIndex == call.callIndex) { - // Previously active call is not active now. Disable audio. + // Previously active call is not active now. this._activeCall = null; + } + + if (!this._activeCall) { + // No active call. Disable the audio. gAudioManager.phoneState = nsIAudioManager.PHONE_STATE_NORMAL; debug("No active call, put audio system into PHONE_STATE_NORMAL: " + gAudioManager.phoneState);