mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 1416321 - Do a sync after we successfully connect to a captive portal. r=markh
MozReview-Commit-ID: HuXyJ8IrNwA --HG-- extra : rebase_source : b1171a1235011d5393dcd90a950b55320302c254
This commit is contained in:
parent
99648703bd
commit
8a3dc70885
@ -134,6 +134,7 @@ SyncScheduler.prototype = {
|
||||
|
||||
if (Status.checkSetup() == STATUS_OK) {
|
||||
Svc.Obs.add("wake_notification", this);
|
||||
Svc.Obs.add("captive-portal-login-success", this);
|
||||
IdleService.addIdleObserver(this, Svc.Prefs.get("scheduler.idleTime"));
|
||||
}
|
||||
},
|
||||
@ -275,6 +276,7 @@ SyncScheduler.prototype = {
|
||||
Services.prefs.savePrefFile(null);
|
||||
IdleService.addIdleObserver(this, Svc.Prefs.get("scheduler.idleTime"));
|
||||
Svc.Obs.add("wake_notification", this);
|
||||
Svc.Obs.add("captive-portal-login-success", this);
|
||||
break;
|
||||
case "weave:service:start-over":
|
||||
this.setDefaults();
|
||||
@ -324,6 +326,12 @@ SyncScheduler.prototype = {
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "captive-portal-login-success":
|
||||
this._log.debug("Captive portal login success. Scheduling a sync.");
|
||||
CommonUtils.nextTick(() => {
|
||||
this.scheduleNextSync(3000);
|
||||
});
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user