mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 915638 - part1 - B2G RIL: telephonyCallGroup.onstatechange isn't fired when a conference call is becoming empty. r=vicamo
This commit is contained in:
parent
299bd04d22
commit
97f256f2ed
@ -450,6 +450,7 @@ this.NETWORK_CREG_TECH_LTE = 14;
|
|||||||
this.NETWORK_CREG_TECH_HSPAP = 15;
|
this.NETWORK_CREG_TECH_HSPAP = 15;
|
||||||
this.NETWORK_CREG_TECH_GSM = 16;
|
this.NETWORK_CREG_TECH_GSM = 16;
|
||||||
|
|
||||||
|
this.CALL_STATE_UNKNOWN = -1;
|
||||||
this.CALL_STATE_ACTIVE = 0;
|
this.CALL_STATE_ACTIVE = 0;
|
||||||
this.CALL_STATE_HOLDING = 1;
|
this.CALL_STATE_HOLDING = 1;
|
||||||
this.CALL_STATE_DIALING = 2;
|
this.CALL_STATE_DIALING = 2;
|
||||||
|
@ -3629,12 +3629,12 @@ let RIL = {
|
|||||||
delete this.currentConference.cache;
|
delete this.currentConference.cache;
|
||||||
|
|
||||||
// Update the conference call's state.
|
// Update the conference call's state.
|
||||||
let state = null;
|
let state = CALL_STATE_UNKNOWN;
|
||||||
for each (let call in this.currentConference.participants) {
|
for each (let call in this.currentConference.participants) {
|
||||||
if (state && state != call.state) {
|
if (state != CALL_STATE_UNKNOWN && state != call.state) {
|
||||||
// Each participant should have the same state, otherwise something
|
// Each participant should have the same state, otherwise something
|
||||||
// wrong happens.
|
// wrong happens.
|
||||||
state = null;
|
state = CALL_STATE_UNKNOWN;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
state = call.state;
|
state = call.state;
|
||||||
|
@ -216,6 +216,8 @@ TelephonyProvider.prototype = {
|
|||||||
|
|
||||||
_convertRILCallState: function _convertRILCallState(aState) {
|
_convertRILCallState: function _convertRILCallState(aState) {
|
||||||
switch (aState) {
|
switch (aState) {
|
||||||
|
case RIL.CALL_STATE_UNKNOWN:
|
||||||
|
return nsITelephonyProvider.CALL_STATE_UNKNOWN;
|
||||||
case RIL.CALL_STATE_ACTIVE:
|
case RIL.CALL_STATE_ACTIVE:
|
||||||
return nsITelephonyProvider.CALL_STATE_CONNECTED;
|
return nsITelephonyProvider.CALL_STATE_CONNECTED;
|
||||||
case RIL.CALL_STATE_HOLDING:
|
case RIL.CALL_STATE_HOLDING:
|
||||||
@ -492,8 +494,7 @@ TelephonyProvider.prototype = {
|
|||||||
|
|
||||||
notifyConferenceCallStateChanged: function notifyConferenceCallStateChanged(aState) {
|
notifyConferenceCallStateChanged: function notifyConferenceCallStateChanged(aState) {
|
||||||
if (DEBUG) debug("handleConferenceCallStateChanged: " + aState);
|
if (DEBUG) debug("handleConferenceCallStateChanged: " + aState);
|
||||||
aState = aState != null ? this._convertRILCallState(aState) :
|
aState = this._convertRILCallState(aState);
|
||||||
nsITelephonyProvider.CALL_STATE_UNKNOWN;
|
|
||||||
this._updateCallAudioState(null, aState);
|
this._updateCallAudioState(null, aState);
|
||||||
|
|
||||||
this._notifyAllListeners("conferenceCallStateChanged", [aState]);
|
this._notifyAllListeners("conferenceCallStateChanged", [aState]);
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
"@mozilla.org/telephony/gonktelephonyprovider;1"
|
"@mozilla.org/telephony/gonktelephonyprovider;1"
|
||||||
%}
|
%}
|
||||||
|
|
||||||
[scriptable, uuid(0d106c7e-ba47-48ee-ba48-c92002d401b6)]
|
[scriptable, uuid(f072f334-e4ea-4754-9929-533da30444a8)]
|
||||||
interface nsIGonkTelephonyProvider : nsITelephonyProvider
|
interface nsIGonkTelephonyProvider : nsITelephonyProvider
|
||||||
{
|
{
|
||||||
void notifyCallDisconnected(in jsval call);
|
void notifyCallDisconnected(in jsval call);
|
||||||
@ -27,5 +27,5 @@ interface nsIGonkTelephonyProvider : nsITelephonyProvider
|
|||||||
void notifySupplementaryService(in long callIndex,
|
void notifySupplementaryService(in long callIndex,
|
||||||
in AString notification);
|
in AString notification);
|
||||||
|
|
||||||
void notifyConferenceCallStateChanged(in unsigned short state);
|
void notifyConferenceCallStateChanged(in short state);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user