mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 990472 - Part 1: Refactor: check of call on other client. r=hsinyi
This commit is contained in:
parent
d9761e4a35
commit
c31a9c5dc3
@ -430,19 +430,21 @@ TelephonyProvider.prototype = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// For DSDS, if there is aleady a call on SIM X, we cannot place any new
|
function hasCallsOnOtherClient(aClientId) {
|
||||||
// call on other SIM.
|
for (let cid = 0; cid < this._numClients; ++cid) {
|
||||||
let callOnOtherSim = false;
|
if (cid === aClientId) {
|
||||||
for (let cid = 0; cid < this._numClients; ++cid) {
|
continue;
|
||||||
if (cid === aClientId) {
|
}
|
||||||
continue;
|
if (Object.keys(this._currentCalls[cid]).length !== 0) {
|
||||||
}
|
return true;
|
||||||
if (Object.keys(this._currentCalls[cid]).length !== 0) {
|
}
|
||||||
callOnOtherSim = true;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
if (callOnOtherSim) {
|
|
||||||
|
// For DSDS, if there is aleady a call on SIM 'aClientId', we cannot place
|
||||||
|
// any new call on other SIM.
|
||||||
|
if (hasCallsOnOtherClient.call(this, aClientId)) {
|
||||||
if (DEBUG) debug("Already has a call on other sim. Drop.");
|
if (DEBUG) debug("Already has a call on other sim. Drop.");
|
||||||
aTelephonyCallback.notifyDialError(DIAL_ERROR_OTHER_CONNECTION_IN_USE);
|
aTelephonyCallback.notifyDialError(DIAL_ERROR_OTHER_CONNECTION_IN_USE);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user