зеркало из https://github.com/mozilla/gecko-dev.git
Bug 935537 - Fix powerOffRadioSafely. r=hsinyi
This commit is contained in:
Родитель
25dc7d87e2
Коммит
c17a6f573b
|
@ -1562,6 +1562,7 @@ RadioInterface.prototype = {
|
|||
}
|
||||
this._radioOffTimer.initWithCallback(this._fireRadioOffTimer.bind(this),
|
||||
RADIO_POWER_OFF_TIMEOUT, Ci.nsITimer.TYPE_ONE_SHOT);
|
||||
this._radioOffAfterDataDisconnected = true;
|
||||
return;
|
||||
}
|
||||
this.setRadioEnabled(false);
|
||||
|
@ -2004,7 +2005,7 @@ RadioInterface.prototype = {
|
|||
// Process pending radio power off request after all data calls
|
||||
// are disconnected.
|
||||
if (datacall.state == RIL.GECKO_NETWORK_STATE_UNKNOWN &&
|
||||
this._changingRadioPower) {
|
||||
this._radioOffAfterDataDisconnected) {
|
||||
let anyDataConnected = false;
|
||||
for each (let apnSetting in this.apnSettings.byApn) {
|
||||
for each (let type in apnSetting.types) {
|
||||
|
@ -2019,6 +2020,7 @@ RadioInterface.prototype = {
|
|||
}
|
||||
if (!anyDataConnected) {
|
||||
if (DEBUG) this.debug("All data connections are disconnected, set radio off.");
|
||||
this._radioOffAfterDataDisconnected = false;
|
||||
this._cancelRadioOffTimer();
|
||||
this.setRadioEnabled(false);
|
||||
}
|
||||
|
@ -2282,6 +2284,10 @@ RadioInterface.prototype = {
|
|||
// the radio power.
|
||||
_changingRadioPower: false,
|
||||
|
||||
// Flag to determine if we need to set radio off when we are notified a data
|
||||
// call has been disconnected.
|
||||
_radioOffAfterDataDisconnected: false,
|
||||
|
||||
// Data calls setting.
|
||||
dataCallSettings: null,
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче