Bug 1666324 - Do not automatically download updates when opening About or Preferences. r=mkmelin a=wsmwk
Sometimes we have the Balrog update rate set to 0 to allow for only "manual" updates.
However, when Help->About or Preferences is opened, an update check starts with force=1
which bypasses the 0 rate and downloads whatever update is available.
This causes numerous support requests and bugs from users saying they were updated
unexpectedly as there is no easy way to back out of an update once it has been
staged.
Both the About dialog and the Preferences tab use the same code from
aboutDialog-appUpdater.js to start the check and handle the result, so this change
displays the button giving the user the option to download. That code already
exists and works.
An update should not be forced by either checking your current version in About
or by opening Preferences.
Differential Revision:
https://phabricator.services.mozilla.com/D90904
--- a/mail/base/content/aboutDialog-appUpdater.js
+++ b/mail/base/content/aboutDialog-appUpdater.js
@@ -337,28 +337,18 @@ appUpdater.prototype = {
return;
}
if (!gAppUpdater.aus.canApplyUpdates) {
gAppUpdater.selectPanel("manualUpdate");
return;
}
- if (!gAppUpdater.promiseAutoUpdateSetting) {
- gAppUpdater.promiseAutoUpdateSetting = UpdateUtils.getAppUpdateAutoEnabled();
- }
- gAppUpdater.promiseAutoUpdateSetting.then(updateAuto => {
- if (updateAuto) {
- // automatically download and install
- gAppUpdater.startDownload();
- } else {
- // ask
- gAppUpdater.selectPanel("downloadAndInstall");
- }
- });
+ // when called from About dialog or preferences tab always ask!
+ gAppUpdater.selectPanel("downloadAndInstall");
},
/**
* See nsIUpdateService.idl
*/
onError(aRequest, aUpdate) {
// Errors in the update check are treated as no updates found. If the
// update check fails repeatedly without a success the user will be