diff --git a/dom/system/gonk/RadioInterfaceLayer.js b/dom/system/gonk/RadioInterfaceLayer.js index afcdb0dd2f08..31b03ca66293 100644 --- a/dom/system/gonk/RadioInterfaceLayer.js +++ b/dom/system/gonk/RadioInterfaceLayer.js @@ -3314,16 +3314,14 @@ RadioInterface.prototype = { * Set the setting value of "time.clock.automatic-update.available". */ setClockAutoUpdateAvailable: function(value) { - gSettingsService.createLock().set(kSettingsClockAutoUpdateAvailable, value, null, - "fromInternalSetting"); + gSettingsService.createLock().set(kSettingsClockAutoUpdateAvailable, value, null); }, /** * Set the setting value of "time.timezone.automatic-update.available". */ setTimezoneAutoUpdateAvailable: function(value) { - gSettingsService.createLock().set(kSettingsTimezoneAutoUpdateAvailable, value, null, - "fromInternalSetting"); + gSettingsService.createLock().set(kSettingsTimezoneAutoUpdateAvailable, value, null); }, /** @@ -3499,7 +3497,7 @@ RadioInterface.prototype = { switch (topic) { case kMozSettingsChangedObserverTopic: let setting = JSON.parse(data); - this.handleSettingsChange(setting.key, setting.value, setting.message); + this.handleSettingsChange(setting.key, setting.value, setting.isInternalChange); break; case kSysClockChangeObserverTopic: let offset = parseInt(data, 10); @@ -3580,11 +3578,11 @@ RadioInterface.prototype = { // ICC's mcc-mnc. _lastKnownHomeNetwork: null, - handleSettingsChange: function(aName, aResult, aMessage) { + handleSettingsChange: function(aName, aResult, aIsInternalSetting) { // Don't allow any content processes to modify the setting // "time.clock.automatic-update.available" except for the chrome process. if (aName === kSettingsClockAutoUpdateAvailable && - aMessage !== "fromInternalSetting") { + !aIsInternalSetting) { let isClockAutoUpdateAvailable = this._lastNitzMessage !== null || this._sntp.isAvailable(); if (aResult !== isClockAutoUpdateAvailable) { @@ -3600,7 +3598,7 @@ RadioInterface.prototype = { // "time.timezone.automatic-update.available" except for the chrome // process. if (aName === kSettingsTimezoneAutoUpdateAvailable && - aMessage !== "fromInternalSetting") { + !aIsInternalSetting) { let isTimezoneAutoUpdateAvailable = this._lastNitzMessage !== null; if (aResult !== isTimezoneAutoUpdateAvailable) { if (DEBUG) { diff --git a/dom/wifi/WifiWorker.js b/dom/wifi/WifiWorker.js index 4681796d3ea9..4b6af426c8c3 100644 --- a/dom/wifi/WifiWorker.js +++ b/dom/wifi/WifiWorker.js @@ -3511,8 +3511,7 @@ WifiWorker.prototype = { handleError: function(aErrorMessage) { self.requestDone(); } - }, - "fromInternalSetting"); + }); }, notifyTetheringOff: function notifyTetheringOff() { @@ -3532,8 +3531,7 @@ WifiWorker.prototype = { handleError: function(aErrorMessage) { self.requestDone(); } - }, - "fromInternalSetting"); + }); }, handleWifiEnabled: function(enabled) { @@ -3609,7 +3607,7 @@ WifiWorker.prototype = { let setting = JSON.parse(data); // To avoid WifiWorker setting the wifi again, don't need to deal with // the "mozsettings-changed" event fired from internal setting. - if (setting.message && setting.message === "fromInternalSetting") { + if (setting.isInternalChange) { return; }