зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1091551 - Part 1: Notify callDisconnected after audioStateChanged. r=hsinyi
This commit is contained in:
Родитель
78b595cd10
Коммит
1f61d1fcae
|
@ -3946,9 +3946,11 @@ RilObject.prototype = {
|
|||
_processClassifiedCalls: function(removedCalls, remainedCalls, addedCalls,
|
||||
failCause) {
|
||||
// Handle removed calls.
|
||||
// Only remove it from the map here. Notify callDisconnected later.
|
||||
for (let call of removedCalls) {
|
||||
this._removeVoiceCall(call, call.hangUpLocal ?
|
||||
GECKO_CALL_ERROR_NORMAL_CALL_CLEARING : failCause);
|
||||
delete this.currentCalls[call.callIndex];
|
||||
call.failCause = call.hangUpLocal ? GECKO_CALL_ERROR_NORMAL_CALL_CLEARING
|
||||
: failCause;
|
||||
}
|
||||
|
||||
let changedCalls = new Set();
|
||||
|
@ -3999,13 +4001,18 @@ RilObject.prototype = {
|
|||
}
|
||||
}
|
||||
|
||||
// Update audio state. We have to send the message before callstatechange
|
||||
// to make sure that the audio state is ready first.
|
||||
// Update audio state. We have to send this message before callStateChange
|
||||
// and callDisconnected to make sure that the audio state is ready first.
|
||||
this.sendChromeMessage({
|
||||
rilMessageType: "audioStateChanged",
|
||||
state: this._detectAudioState()
|
||||
});
|
||||
|
||||
// Notify call disconnected.
|
||||
for (let call of removedCalls) {
|
||||
this._handleDisconnectedCall(call);
|
||||
}
|
||||
|
||||
// Notify call state change.
|
||||
for (let call of changedCalls) {
|
||||
this._handleChangedCallState(call);
|
||||
|
@ -4068,12 +4075,6 @@ RilObject.prototype = {
|
|||
this.currentCalls[newCall.callIndex] = newCall;
|
||||
},
|
||||
|
||||
_removeVoiceCall: function(call, failCause) {
|
||||
delete this.currentCalls[call.callIndex];
|
||||
call.failCause = failCause;
|
||||
this._handleDisconnectedCall(call);
|
||||
},
|
||||
|
||||
_handleChangedCallState: function(changedCall) {
|
||||
let message = {rilMessageType: "callStateChange",
|
||||
call: changedCall};
|
||||
|
|
Загрузка…
Ссылка в новой задаче