зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset d4a7883e0e92 (bug 978639)
This commit is contained in:
Родитель
9e7fc14863
Коммит
35367e534a
|
@ -215,7 +215,6 @@ const TELEPHONY_REQUESTS = [
|
|||
REQUEST_DIAL,
|
||||
REQUEST_DIAL_EMERGENCY_CALL,
|
||||
REQUEST_HANGUP,
|
||||
REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND,
|
||||
REQUEST_HANGUP_WAITING_OR_BACKGROUND,
|
||||
REQUEST_SEPARATE_CONNECTION,
|
||||
REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE,
|
||||
|
@ -1780,25 +1779,13 @@ RilObject.prototype = {
|
|||
Buf.sendParcel();
|
||||
},
|
||||
|
||||
sendHangUpForegroundRequest: function(options) {
|
||||
this.telephonyRequestQueue.push(REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND,
|
||||
this.sendRilRequestHangUpForeground,
|
||||
options);
|
||||
},
|
||||
|
||||
sendRilRequestHangUpForeground: function(options) {
|
||||
this.context.Buf.simpleRequest(REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND,
|
||||
options);
|
||||
},
|
||||
|
||||
sendHangUpBackgroundRequest: function(options) {
|
||||
sendHangUpBackgroundRequest: function() {
|
||||
this.telephonyRequestQueue.push(REQUEST_HANGUP_WAITING_OR_BACKGROUND,
|
||||
this.sendRilRequestHangUpWaiting, options);
|
||||
this.sendRilRequestHangUpWaiting, null);
|
||||
},
|
||||
|
||||
sendRilRequestHangUpWaiting: function(options) {
|
||||
this.context.Buf.simpleRequest(REQUEST_HANGUP_WAITING_OR_BACKGROUND,
|
||||
options);
|
||||
sendRilRequestHangUpWaiting: function() {
|
||||
this.context.Buf.simpleRequest(REQUEST_HANGUP_WAITING_OR_BACKGROUND);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -1987,27 +1974,6 @@ RilObject.prototype = {
|
|||
Buf.sendParcel();
|
||||
},
|
||||
|
||||
hangUpConference: function(options) {
|
||||
if (this._isCdma) {
|
||||
// In cdma, ril only maintains one call index.
|
||||
let call = this.currentCalls[1];
|
||||
if (!call) {
|
||||
options.success = false;
|
||||
options.errorMsg = GECKO_ERROR_GENERIC_FAILURE;
|
||||
this.sendChromeMessage(options);
|
||||
return;
|
||||
}
|
||||
call.hangUpLocal = true;
|
||||
this.sendHangUpRequest(1);
|
||||
} else {
|
||||
if (this.currentConference.state === CALL_STATE_ACTIVE) {
|
||||
this.sendHangUpForegroundRequest(options);
|
||||
} else {
|
||||
this.sendHangUpBackgroundRequest(options);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
holdConference: function() {
|
||||
if (this._isCdma) {
|
||||
return;
|
||||
|
@ -5531,19 +5497,26 @@ RilObject.prototype[REQUEST_GET_IMSI] = function REQUEST_GET_IMSI(length, option
|
|||
this.sendChromeMessage(options);
|
||||
};
|
||||
RilObject.prototype[REQUEST_HANGUP] = function REQUEST_HANGUP(length, options) {
|
||||
options.success = options.rilRequestError === 0;
|
||||
options.errorMsg = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
|
||||
this.sendChromeMessage(options);
|
||||
|
||||
if (options.success) {
|
||||
this.getCurrentCalls();
|
||||
if (options.rilRequestError) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.getCurrentCalls();
|
||||
};
|
||||
RilObject.prototype[REQUEST_HANGUP_WAITING_OR_BACKGROUND] = function REQUEST_HANGUP_WAITING_OR_BACKGROUND(length, options) {
|
||||
RilObject.prototype[REQUEST_HANGUP].call(this, length, options);
|
||||
if (options.rilRequestError) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.getCurrentCalls();
|
||||
};
|
||||
// TODO Bug 1012599: This one is not used.
|
||||
RilObject.prototype[REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND] = function REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND(length, options) {
|
||||
RilObject.prototype[REQUEST_HANGUP].call(this, length, options);
|
||||
if (options.rilRequestError) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.getCurrentCalls();
|
||||
};
|
||||
RilObject.prototype[REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE] = function REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE(length, options) {
|
||||
if (options.rilRequestError) {
|
||||
|
|
|
@ -1038,16 +1038,6 @@ TelephonyService.prototype = {
|
|||
});
|
||||
},
|
||||
|
||||
hangUpConference: function(aClientId, aCallback) {
|
||||
this._sendToRilWorker(aClientId, "hangUpConference", null, response => {
|
||||
if (!response.success) {
|
||||
aCallback.notifyError(response.errorMsg);
|
||||
} else {
|
||||
aCallback.notifySuccess();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
holdConference: function(aClientId) {
|
||||
this._sendToRilWorker(aClientId, "holdConference");
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче