Bug 1666324 - Do not automatically download updates when opening About or Preferences. r=mkmelin a=wsmwk THUNDERBIRD_68_12_1_BUILD1 THUNDERBIRD_68_12_1_RELEASE
authorRob Lemley <rob@thunderbird.net>
Tue, 22 Sep 2020 22:42:18 +0000
changeset 36217 d2236604ebf5c76e9e5097141a704d913b71efa0
parent 36216 697502d10c0d812135ea0ad907edceac72c3db40
child 36218 bbd0b5aa2a5ac686860e10698131023763a16b55
push id118
push userthunderbird@calypsoblue.org
push dateTue, 29 Sep 2020 01:02:18 +0000
treeherdercomm-esr68@d2236604ebf5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin, wsmwk
bugs1666324
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
mail/base/content/aboutDialog-appUpdater.js
--- 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