Backed out changeset 52b00288469c (bug 1015518) for Gaia UI test perma-fails.

CLOSED TREE

--HG--
extra : amend_source : f14efe30e300b626cffa22066c28a0fbda42a80b
This commit is contained in:
Ryan VanderMeulen 2014-08-28 12:44:39 -04:00
Родитель 55fdf111db
Коммит 86c3d649db
2 изменённых файлов: 13 добавлений и 9 удалений

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

@ -3357,14 +3357,16 @@ RadioInterface.prototype = {
* Set the setting value of "time.clock.automatic-update.available".
*/
setClockAutoUpdateAvailable: function(value) {
gSettingsService.createLock().set(kSettingsClockAutoUpdateAvailable, value, null);
gSettingsService.createLock().set(kSettingsClockAutoUpdateAvailable, value, null,
"fromInternalSetting");
},
/**
* Set the setting value of "time.timezone.automatic-update.available".
*/
setTimezoneAutoUpdateAvailable: function(value) {
gSettingsService.createLock().set(kSettingsTimezoneAutoUpdateAvailable, value, null);
gSettingsService.createLock().set(kSettingsTimezoneAutoUpdateAvailable, value, null,
"fromInternalSetting");
},
/**
@ -3540,7 +3542,7 @@ RadioInterface.prototype = {
switch (topic) {
case kMozSettingsChangedObserverTopic:
let setting = JSON.parse(data);
this.handleSettingsChange(setting.key, setting.value, setting.isInternalChange);
this.handleSettingsChange(setting.key, setting.value, setting.message);
break;
case kSysClockChangeObserverTopic:
let offset = parseInt(data, 10);
@ -3621,11 +3623,11 @@ RadioInterface.prototype = {
// ICC's mcc-mnc.
_lastKnownHomeNetwork: null,
handleSettingsChange: function(aName, aResult, aIsInternalSetting) {
handleSettingsChange: function(aName, aResult, aMessage) {
// Don't allow any content processes to modify the setting
// "time.clock.automatic-update.available" except for the chrome process.
if (aName === kSettingsClockAutoUpdateAvailable &&
!aIsInternalSetting) {
aMessage !== "fromInternalSetting") {
let isClockAutoUpdateAvailable = this._lastNitzMessage !== null ||
this._sntp.isAvailable();
if (aResult !== isClockAutoUpdateAvailable) {
@ -3641,7 +3643,7 @@ RadioInterface.prototype = {
// "time.timezone.automatic-update.available" except for the chrome
// process.
if (aName === kSettingsTimezoneAutoUpdateAvailable &&
!aIsInternalSetting) {
aMessage !== "fromInternalSetting") {
let isTimezoneAutoUpdateAvailable = this._lastNitzMessage !== null;
if (aResult !== isTimezoneAutoUpdateAvailable) {
if (DEBUG) {

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

@ -3510,7 +3510,8 @@ WifiWorker.prototype = {
handleError: function(aErrorMessage) {
self.requestDone();
}
});
},
"fromInternalSetting");
},
notifyTetheringOff: function notifyTetheringOff() {
@ -3530,7 +3531,8 @@ WifiWorker.prototype = {
handleError: function(aErrorMessage) {
self.requestDone();
}
});
},
"fromInternalSetting");
},
handleWifiEnabled: function(enabled) {
@ -3606,7 +3608,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.isInternalChange) {
if (setting.message && setting.message === "fromInternalSetting") {
return;
}