Bug 1174673 - Part 1: Automatically resume the held call. r=hsinyi

This commit is contained in:
Szu-Yu Chen [:aknow] 2015-06-30 18:02:23 +08:00
parent 947d340288
commit 42389451f1

View File

@ -1185,6 +1185,17 @@ TelephonyService.prototype = {
return;
}
// It's a foreground call.
if (!call.isConference) {
let heldCalls = this._getCallsWithState(aClientId, nsITelephonyService.CALL_STATE_HELD);
// Automatic resume another held call.
if (heldCalls.length) {
this._hangUpForeground(aClientId, aCallback);
return;
}
}
call.hangUpLocal = true;
this._sendToRilWorker(aClientId, "hangUpCall", { callIndex: aCallIndex },
this._defaultCallbackHandler.bind(this, aCallback));