Bug 952374 - [Fugu] data connectivity lost after left idle. r=hsinyi

This commit is contained in:
Jessica Jong 2014-01-23 17:05:04 +08:00
Родитель 6f4faa3403
Коммит 8f83a592bd
1 изменённых файлов: 13 добавлений и 12 удалений

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

@ -4108,6 +4108,19 @@ RILNetworkInterface.prototype = {
this.state = datacall.state;
Services.obs.notifyObservers(this,
kNetworkInterfaceStateChangedTopic,
null);
if ((this.state == RIL.GECKO_NETWORK_STATE_UNKNOWN ||
this.state == RIL.GECKO_NETWORK_STATE_DISCONNECTED) &&
this.registeredAsNetworkInterface) {
gNetworkManager.unregisterNetworkInterface(this);
this.registeredAsNetworkInterface = false;
this.cid = null;
this.connectedTypes = [];
}
// In case the data setting changed while the datacall was being started or
// ended, let's re-check the setting and potentially adjust the datacall
// state again.
@ -4116,18 +4129,6 @@ RILNetworkInterface.prototype = {
this.apnSetting.apn)) {
this.radioInterface.updateRILNetworkInterface();
}
Services.obs.notifyObservers(this,
kNetworkInterfaceStateChangedTopic,
null);
if (this.state == RIL.GECKO_NETWORK_STATE_UNKNOWN &&
this.registeredAsNetworkInterface) {
gNetworkManager.unregisterNetworkInterface(this);
this.registeredAsNetworkInterface = false;
this.cid = null;
this.connectedTypes = [];
}
},
receiveDataCallList: function(dataCalls, length) {