Bug 944589 - [Voice Channel][Dialer][Airplane Mode] If you switch to airplane mode when talking, voice channel will not recover. r=vicamo

This commit is contained in:
Hsin-Yi Tsai 2013-12-02 18:51:54 +08:00
Родитель d180b9d224
Коммит 2267b9c6d9
2 изменённых файлов: 18 добавлений и 19 удалений

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

@ -4990,8 +4990,8 @@ RIL[REQUEST_DIAL] = function REQUEST_DIAL(length, options) {
if (options.rilRequestError) { if (options.rilRequestError) {
// The connection is not established yet. // The connection is not established yet.
options.callIndex = -1; options.callIndex = -1;
this.getFailCauseCode(options); this._sendCallError(options.callIndex,
return; RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError]);
} }
}; };
RIL[REQUEST_GET_IMSI] = function REQUEST_GET_IMSI(length, options) { RIL[REQUEST_GET_IMSI] = function REQUEST_GET_IMSI(length, options) {
@ -5070,15 +5070,8 @@ RIL[REQUEST_LAST_CALL_FAIL_CAUSE] = function REQUEST_LAST_CALL_FAIL_CAUSE(length
} }
let failCause = Buf.readInt32(); let failCause = Buf.readInt32();
switch (failCause) { options.failCause = RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[failCause];
case CALL_FAIL_NORMAL: this._handleDisconnectedCall(options);
this._handleDisconnectedCall(options);
break;
default:
this._sendCallError(options.callIndex,
RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[failCause]);
break;
}
}; };
RIL[REQUEST_SIGNAL_STRENGTH] = function REQUEST_SIGNAL_STRENGTH(length, options) { RIL[REQUEST_SIGNAL_STRENGTH] = function REQUEST_SIGNAL_STRENGTH(length, options) {
this._receivedNetworkInfo(NETWORK_INFO_SIGNAL); this._receivedNetworkInfo(NETWORK_INFO_SIGNAL);

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

@ -496,14 +496,20 @@ TelephonyProvider.prototype = {
this._updateCallAudioState(aCall, null); this._updateCallAudioState(aCall, null);
this._notifyAllListeners("callStateChanged", [aClientId, if (!aCall.failCause ||
aCall.callIndex, aCall.failCause === RIL.GECKO_CALL_ERROR_NORMAL_CALL_CLEARING) {
aCall.state, this._notifyAllListeners("callStateChanged", [aClientId,
aCall.number, aCall.callIndex,
aCall.isActive, aCall.state,
aCall.isOutgoing, aCall.number,
aCall.isEmergency, aCall.isActive,
aCall.isConference]); aCall.isOutgoing,
aCall.isEmergency,
aCall.isConference]);
return;
}
this.notifyCallError(aClientId, aCall.callIndex, aCall.failCause);
}, },
/** /**