Bug 984326 - [B2G] [RIL] [CDMA] call waiting isn't working properly. The 2nd remote party cannot hear voice. r=vicamo

This commit is contained in:
Hsin-Yi Tsai 2014-03-18 15:57:32 +08:00
parent 9b32d42a30
commit ea3978bfb6

View File

@ -529,42 +529,7 @@ TelephonyProvider.prototype = {
return;
}
let parentId = this._currentCalls[aClientId][aCallIndex].parentId;
if (parentId) {
this.resumeCall(aClientId, parentId);
return;
}
function onCdmaHoldCallSuccess() {
let call = this._currentCalls[aClientId][aCallIndex];
if (!call) {
return;
}
call.state = RIL.CALL_STATE_HOLDING;
this.notifyCallStateChanged(aClientId, call);
if (!call.childId) {
return;
}
let childCall = this._currentCalls[aClientId][call.childId];
childCall.state = RIL.CALL_STATE_ACTIVE;
this.notifyCallStateChanged(aClientId, childCall);
};
this._getClient(aClientId).sendWorkerMessage("holdCall", {
callIndex: aCallIndex
},(function(response) {
if (!response.success) {
return false;
}
if (response.isCdma) {
onCdmaHoldCallSuccess.call(this);
}
return false;
}).bind(this));
this._getClient(aClientId).sendWorkerMessage("holdCall", { callIndex: aCallIndex });
},
resumeCall: function(aClientId, aCallIndex) {
@ -575,43 +540,7 @@ TelephonyProvider.prototype = {
return;
}
let parentId = this._currentCalls[aClientId][aCallIndex].parentId;
if (parentId) {
this.holdCall(aClientId, parentId);
return;
}
function onCdmaResumeCallSuccess() {
let call = this._currentCalls[aClientId][aCallIndex];
if (!call) {
return;
}
call.state = RIL.CALL_STATE_ACTIVE;
this.notifyCallStateChanged(aClientId, call);
let childId = call.childId;
if (!childId) {
return;
}
let childCall = this._currentCalls[aClientId][childId];
childCall.state = RIL.CALL_STATE_HOLDING;
this.notifyCallStateChanged(aClientId, childCall);
};
this._getClient(aClientId).sendWorkerMessage("resumeCall", {
callIndex: aCallIndex
},(function(response) {
if (!response.success) {
return false;
}
if (response.isCdma) {
onCdmaResumeCallSuccess.call(this);
}
return false;
}).bind(this));
this._getClient(aClientId).sendWorkerMessage("resumeCall", { callIndex: aCallIndex });
},
conferenceCall: function(aClientId) {