зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1016849 - Part 4: Remove isActive (provider). r=hsinyi
This commit is contained in:
Родитель
f6fb2a8ba2
Коммит
9be248ac38
|
@ -241,19 +241,16 @@ TelephonyProvider.prototype = {
|
||||||
case nsITelephonyProvider.CALL_STATE_DIALING: // Fall through...
|
case nsITelephonyProvider.CALL_STATE_DIALING: // Fall through...
|
||||||
case nsITelephonyProvider.CALL_STATE_ALERTING:
|
case nsITelephonyProvider.CALL_STATE_ALERTING:
|
||||||
case nsITelephonyProvider.CALL_STATE_CONNECTED:
|
case nsITelephonyProvider.CALL_STATE_CONNECTED:
|
||||||
aCall.isActive = true;
|
|
||||||
this._activeCall = new SingleCall(aCall);
|
this._activeCall = new SingleCall(aCall);
|
||||||
this._updateCallAudioState(aCall);
|
this._updateCallAudioState(aCall);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case nsITelephonyProvider.CALL_STATE_INCOMING:
|
case nsITelephonyProvider.CALL_STATE_INCOMING:
|
||||||
aCall.isActive = false;
|
|
||||||
this._updateCallAudioState(aCall);
|
this._updateCallAudioState(aCall);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case nsITelephonyProvider.CALL_STATE_HELD: // Fall through...
|
case nsITelephonyProvider.CALL_STATE_HELD: // Fall through...
|
||||||
case nsITelephonyProvider.CALL_STATE_DISCONNECTED:
|
case nsITelephonyProvider.CALL_STATE_DISCONNECTED:
|
||||||
aCall.isActive = false;
|
|
||||||
if (this._matchActiveSingleCall(aCall)) {
|
if (this._matchActiveSingleCall(aCall)) {
|
||||||
// Previously active call is not active now.
|
// Previously active call is not active now.
|
||||||
this._activeCall = null;
|
this._activeCall = null;
|
||||||
|
@ -359,7 +356,6 @@ TelephonyProvider.prototype = {
|
||||||
for (let call of response.calls) {
|
for (let call of response.calls) {
|
||||||
call.clientId = aClientId;
|
call.clientId = aClientId;
|
||||||
call.state = this._convertRILCallState(call.state);
|
call.state = this._convertRILCallState(call.state);
|
||||||
call.isActive = this._matchActiveSingleCall(call);
|
|
||||||
call.isSwitchable = true;
|
call.isSwitchable = true;
|
||||||
call.isMergeable = true;
|
call.isMergeable = true;
|
||||||
|
|
||||||
|
@ -404,8 +400,7 @@ TelephonyProvider.prototype = {
|
||||||
for (let i = 0, indexes = Object.keys(calls); i < indexes.length; ++i) {
|
for (let i = 0, indexes = Object.keys(calls); i < indexes.length; ++i) {
|
||||||
let call = calls[indexes[i]];
|
let call = calls[indexes[i]];
|
||||||
aListener.enumerateCallState(call.clientId, call.callIndex,
|
aListener.enumerateCallState(call.clientId, call.callIndex,
|
||||||
call.state, call.number,
|
call.state, call.number, call.isOutgoing,
|
||||||
call.isActive, call.isOutgoing,
|
|
||||||
call.isEmergency, call.isConference,
|
call.isEmergency, call.isConference,
|
||||||
call.isSwitchable, call.isMergeable);
|
call.isSwitchable, call.isMergeable);
|
||||||
}
|
}
|
||||||
|
@ -774,7 +769,6 @@ TelephonyProvider.prototype = {
|
||||||
aCall.callIndex,
|
aCall.callIndex,
|
||||||
aCall.state,
|
aCall.state,
|
||||||
aCall.number,
|
aCall.number,
|
||||||
aCall.isActive,
|
|
||||||
aCall.isOutgoing,
|
aCall.isOutgoing,
|
||||||
aCall.isEmergency,
|
aCall.isEmergency,
|
||||||
aCall.isConference,
|
aCall.isConference,
|
||||||
|
@ -828,7 +822,6 @@ TelephonyProvider.prototype = {
|
||||||
call.state = aCall.state;
|
call.state = aCall.state;
|
||||||
call.isConference = aCall.isConference;
|
call.isConference = aCall.isConference;
|
||||||
call.isEmergency = aCall.isEmergency;
|
call.isEmergency = aCall.isEmergency;
|
||||||
call.isActive = aCall.isActive;
|
|
||||||
call.isSwitchable = aCall.isSwitchable != null ?
|
call.isSwitchable = aCall.isSwitchable != null ?
|
||||||
aCall.isSwitchable : call.isSwitchable;
|
aCall.isSwitchable : call.isSwitchable;
|
||||||
call.isMergeable = aCall.isMergeable != null ?
|
call.isMergeable = aCall.isMergeable != null ?
|
||||||
|
@ -847,7 +840,6 @@ TelephonyProvider.prototype = {
|
||||||
call.callIndex,
|
call.callIndex,
|
||||||
call.state,
|
call.state,
|
||||||
call.number,
|
call.number,
|
||||||
call.isActive,
|
|
||||||
call.isOutgoing,
|
call.isOutgoing,
|
||||||
call.isEmergency,
|
call.isEmergency,
|
||||||
call.isConference,
|
call.isConference,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче