Backed out changeset a3d1c00b6592 (bug 984919) for causing bug 988979

This commit is contained in:
Ed Morley 2014-03-28 17:03:17 +00:00
Родитель 230f8e0bab
Коммит 52fa01875b
1 изменённых файлов: 1 добавлений и 22 удалений

Просмотреть файл

@ -35,9 +35,6 @@ const CALL_WAKELOCK_TIMEOUT = 5000;
// Index of the CDMA second call which isn't held in RIL but only in TelephoyProvider.
const CDMA_SECOND_CALL_INDEX = 2;
const DIAL_ERROR_INVALID_STATE_ERROR = "InvalidStateError";
const DIAL_ERROR_OTHER_CONNECTION_IN_USE = "OtherConnectionInUse";
let DEBUG;
function debug(s) {
dump("TelephonyProvider: " + s + "\n");
@ -423,25 +420,7 @@ TelephonyProvider.prototype = {
if (this.isDialing) {
if (DEBUG) debug("Already has a dialing call. Drop.");
aTelephonyCallback.notifyDialError(DIAL_ERROR_INVALID_STATE_ERROR);
return;
}
// For DSDS, if there is aleady a call on SIM X, we cannot place any new
// call on other SIM.
let callOnOtherSim = false;
for (let cid = 0; cid < this._numClients; ++cid) {
if (cid === aClientId) {
continue;
}
if (Object.keys(this._currentCalls[cid]).length !== 0) {
callOnOtherSim = true;
break;
}
}
if (callOnOtherSim) {
if (DEBUG) debug("Already has a call on other sim. Drop.");
aTelephonyCallback.notifyDialError(DIAL_ERROR_OTHER_CONNECTION_IN_USE);
aTelephonyCallback.notifyDialError("InvalidStateError");
return;
}