Bug 785982 - B2G RIL: toggling on->off 3G data call quickly caused data call stay in UP state. r=philikon

This commit is contained in:
Shian-Yow Wu 2012-09-26 21:05:28 +08:00
parent f3fdc22098
commit 4869ba34cd

View File

@ -820,6 +820,12 @@ RadioInterfaceLayer.prototype = {
return;
}
if (this.dataNetworkInterface.state == RIL.GECKO_NETWORK_STATE_CONNECTING ||
this.dataNetworkInterface.state == RIL.GECKO_NETWORK_STATE_DISCONNECTING) {
debug("Nothing to do during connecting/disconnecting in progress.");
return;
}
if (!this.dataCallSettings["enabled"] && this.dataNetworkInterface.connected) {
debug("Data call settings: disconnect data call.");
this.dataNetworkInterface.disconnect();
@ -2110,6 +2116,13 @@ RILNetworkInterface.prototype = {
this.state = datacall.state;
// 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.
if (this == this.mRIL.dataNetworkInterface) {
this.mRIL.updateRILNetworkInterface();
}
if (this.state == RIL.GECKO_NETWORK_STATE_UNKNOWN &&
this.registeredAsNetworkInterface) {
gNetworkManager.unregisterNetworkInterface(this);