Bug 609366 - Switching from 3G to Wifi stops the nightly update download and then restarting Fennec shows you the package installer for the partial package. r=mfinkle a=blocking-fennec

This commit is contained in:
Alex Pakhotin 2010-11-18 14:38:31 -08:00
parent 46d5fecb08
commit b88f4b99d4

View File

@ -137,7 +137,8 @@ UpdatePrompt.prototype = {
_updateDownloadProgress: function UP__updateDownloadProgress(aProgress, aTotal) {
let alertsService = Cc["@mozilla.org/alerts-service;1"].getService(Ci.nsIAlertsService);
let progressListener = alertsService.QueryInterface(Ci.nsIAlertsProgressListener);
progressListener.onProgress(UPDATE_NOTIFICATION_NAME, aProgress, aTotal);
if (progressListener)
progressListener.onProgress(UPDATE_NOTIFICATION_NAME, aProgress, aTotal);
},
// -------------------------
@ -207,6 +208,12 @@ UpdatePrompt.prototype = {
// When the data transfer ends
onStopRequest: function(request, context, status) {
let alertsService = Cc["@mozilla.org/alerts-service;1"].getService(Ci.nsIAlertsService);
let progressListener = alertsService.QueryInterface(Ci.nsIAlertsProgressListener);
if (progressListener)
progressListener.onCancel(UPDATE_NOTIFICATION_NAME);
let aus = Cc["@mozilla.org/updates/update-service;1"].getService(Ci.nsIApplicationUpdateService);
aus.removeDownloadListener(this);
},