зеркало из https://github.com/mozilla/gecko-dev.git
Bug 761533 - WebTelephony: busy event is never fired. r=philikon
This commit is contained in:
Родитель
d0e97f794d
Коммит
a430dc28a1
|
@ -94,6 +94,8 @@ function convertRILCallState(state) {
|
||||||
case RIL.CALL_STATE_INCOMING:
|
case RIL.CALL_STATE_INCOMING:
|
||||||
case RIL.CALL_STATE_WAITING:
|
case RIL.CALL_STATE_WAITING:
|
||||||
return nsIRadioInterfaceLayer.CALL_STATE_INCOMING;
|
return nsIRadioInterfaceLayer.CALL_STATE_INCOMING;
|
||||||
|
case RIL.CALL_STATE_BUSY:
|
||||||
|
return nsIRadioInterfaceLayer.CALL_STATE_BUSY;
|
||||||
default:
|
default:
|
||||||
throw new Error("Unknown rilCallState: " + state);
|
throw new Error("Unknown rilCallState: " + state);
|
||||||
}
|
}
|
||||||
|
|
|
@ -370,6 +370,7 @@ const CALL_STATE_DIALING = 2;
|
||||||
const CALL_STATE_ALERTING = 3;
|
const CALL_STATE_ALERTING = 3;
|
||||||
const CALL_STATE_INCOMING = 4;
|
const CALL_STATE_INCOMING = 4;
|
||||||
const CALL_STATE_WAITING = 5;
|
const CALL_STATE_WAITING = 5;
|
||||||
|
const CALL_STATE_BUSY = 6;
|
||||||
|
|
||||||
const TOA_INTERNATIONAL = 0x91;
|
const TOA_INTERNATIONAL = 0x91;
|
||||||
const TOA_UNKNOWN = 0x81;
|
const TOA_UNKNOWN = 0x81;
|
||||||
|
|
|
@ -2229,7 +2229,7 @@ let RIL = {
|
||||||
// Call is no longer reported by the radio. Remove from our map and
|
// Call is no longer reported by the radio. Remove from our map and
|
||||||
// send disconnected state change.
|
// send disconnected state change.
|
||||||
delete this.currentCalls[currentCall.callIndex];
|
delete this.currentCalls[currentCall.callIndex];
|
||||||
this._handleDisconnectedCall(currentCall);
|
this.getFailCauseCode(currentCall);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2875,9 +2875,28 @@ RIL[REQUEST_LAST_CALL_FAIL_CAUSE] = function REQUEST_LAST_CALL_FAIL_CAUSE(length
|
||||||
}
|
}
|
||||||
|
|
||||||
let failCause = Buf.readUint32();
|
let failCause = Buf.readUint32();
|
||||||
options.type = "callError";
|
switch (failCause) {
|
||||||
options.error = RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[failCause];
|
case CALL_FAIL_NORMAL:
|
||||||
this.sendDOMMessage(options);
|
this._handleDisconnectedCall(options);
|
||||||
|
break;
|
||||||
|
case CALL_FAIL_BUSY:
|
||||||
|
options.state = CALL_STATE_BUSY;
|
||||||
|
this._handleChangedCallState(options);
|
||||||
|
this._handleDisconnectedCall(options);
|
||||||
|
break;
|
||||||
|
case CALL_FAIL_UNOBTAINABLE_NUMBER:
|
||||||
|
case CALL_FAIL_CONGESTION:
|
||||||
|
case CALL_FAIL_ACM_LIMIT_EXCEEDED:
|
||||||
|
case CALL_FAIL_CALL_BARRED:
|
||||||
|
case CALL_FAIL_FDN_BLOCKED:
|
||||||
|
case CALL_FAIL_IMSI_UNKNOWN_IN_VLR:
|
||||||
|
case CALL_FAIL_IMEI_NOT_ACCEPTED:
|
||||||
|
case CALL_FAIL_ERROR_UNSPECIFIED:
|
||||||
|
options.type = "callError";
|
||||||
|
options.error = RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[failCause];
|
||||||
|
this.sendDOMMessage(options);
|
||||||
|
break;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
RIL[REQUEST_SIGNAL_STRENGTH] = function REQUEST_SIGNAL_STRENGTH(length, options) {
|
RIL[REQUEST_SIGNAL_STRENGTH] = function REQUEST_SIGNAL_STRENGTH(length, options) {
|
||||||
if (options.rilRequestError) {
|
if (options.rilRequestError) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче