Bug 1124550 - Part 08: Refactoring holdConference, resumeConference. r=hsinyi

This commit is contained in:
Szu-Yu Chen [:aknow] 2015-02-03 12:18:20 +08:00
Родитель d5024f6c13
Коммит 3e01a0aa0e
2 изменённых файлов: 13 добавлений и 28 удалений

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

@ -1958,30 +1958,6 @@ RilObject.prototype = {
});
},
holdConference: function(options) {
if (this._isCdma) {
// We cannot hold a conference call on CDMA.
options.success = false;
options.errorMsg = GECKO_ERROR_GENERIC_FAILURE;
this.sendChromeMessage(options);
return;
}
this.switchActiveCall(options);
},
resumeConference: function(options) {
if (this._isCdma) {
// We cannot resume a conference call on CDMA
options.success = false;
options.errorMsg = GECKO_ERROR_GENERIC_FAILURE;
this.sendChromeMessage(options);
return;
}
this.switchActiveCall(options);
},
/**
* Get current calls.
*/

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

@ -996,14 +996,23 @@ TelephonyService.prototype = {
this._defaultCallbackHandler.bind(this, aCallback));
},
holdConference: function(aClientId, aCallback) {
this._sendToRilWorker(aClientId, "holdConference", null,
_switchConference: function(aClientId, aCallback) {
// Cannot hold/resume a conference in cdma.
if (this._isCdmaClient(aClientId)) {
aCallback.notifyError(RIL.GECKO_ERROR_GENERIC_FAILURE);
return;
}
this._sendToRilWorker(aClientId, "switchActiveCall", null,
this._defaultCallbackHandler.bind(this, aCallback));
},
holdConference: function(aClientId, aCallback) {
this._switchConference(aClientId, aCallback);
},
resumeConference: function(aClientId, aCallback) {
this._sendToRilWorker(aClientId, "resumeConference", null,
this._defaultCallbackHandler.bind(this, aCallback));
this._switchConference(aClientId, aCallback);
},
sendUSSD: function(aClientId, aUssd, aCallback) {