From 9d386cb6027d6bec7f3b472563e2eaf96eb0def9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Desr=C3=A9?= Date: Tue, 16 Oct 2012 22:07:59 -0700 Subject: [PATCH] Bug 801987 - [OTA update] system notification never reappears after dismissing "Later" and then force updating [r=marshall,a=blocking-basecamp] --- b2g/components/UpdatePrompt.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/b2g/components/UpdatePrompt.js b/b2g/components/UpdatePrompt.js index 42a8a215a215..0ee18292dcd8 100644 --- a/b2g/components/UpdatePrompt.js +++ b/b2g/components/UpdatePrompt.js @@ -310,6 +310,14 @@ UpdatePrompt.prototype = { forceUpdateCheck: function UP_forceUpdateCheck() { log("Forcing update check"); + // If we already have an active update available, don't try to + // download again, just prompt for install. + if (Services.um.activeUpdate) { + this.setUpdateStatus("check-complete"); + this.showApplyPrompt(Services.um.activeUpdate); + return; + } + let checker = Cc["@mozilla.org/updates/update-checker;1"] .createInstance(Ci.nsIUpdateChecker); checker.checkForUpdates(this, true);