Bug 1557910 - Remove app update code and prefs that are no longer necessary. r=darktrojan
authorRobert Strong <robert.strong.bugs@gmail.com>
Fri, 07 Jun 2019 23:04:00 +0200
changeset 35818 b62e68799a992bd8baccd09a6f4e5937878b1c7a
parent 35817 3b41b90ba85ae21731f12162d7769460523245ff
child 35819 222be3dc3eb1bd86a666ac6b0b0cff78cb078c82
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersdarktrojan
bugs1557910
Bug 1557910 - Remove app update code and prefs that are no longer necessary. r=darktrojan
mail/app/profile/all-thunderbird.js
mail/base/content/aboutDialog-appUpdater.js
mail/base/modules/AppUpdateUI.jsm
--- a/mail/app/profile/all-thunderbird.js
+++ b/mail/app/profile/all-thunderbird.js
@@ -40,51 +40,42 @@ pref("app.update.timerFirstInterval", 30
 // App-specific update preferences
 
 // The interval to check for updates (app.update.interval) is defined in
 // the branding files.
 
 // Enables some extra Application Update Logging (can reduce performance)
 pref("app.update.log", false);
 
-// Whether or not to use the doorhanger application update UI.
-pref("app.update.doorhanger", true);
-
 // If set to true, the Update Service will automatically download updates when
 // user can apply updates. This pref is no longer used on Windows, except as the
 // default value to migrate to the new location that this data is now stored
 // (which is in a file in the update directory). Because of this, this pref
 // should no longer be used directly. Instead, getAppUpdateAutoEnabled and
 // getAppUpdateAutoEnabled from UpdateUtils.jsm should be used.
 #ifndef XP_WIN
  pref("app.update.auto", true);
 #endif
 
-// If set to true, the Update Service will present no UI for any event.
-pref("app.update.silent", false);
-
 // If set to true, the Update Service will apply updates in the background
 // when it finishes downloading them.
 pref("app.update.staging.enabled", true);
 
 // Update service URL:
 pref("app.update.url", "https://aus5.mozilla.org/update/6/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%SYSTEM_CAPABILITIES%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml");
 
 // URL user can browse to manually if for some reason all update installation
 // attempts fail.
 pref("app.update.url.manual", "https://www.thunderbird.net");
 // A default value for the "More information about this update" link
 // supplied in the "An update is available" page of the update wizard.
 pref("app.update.url.details", "https://www.thunderbird.net/%LOCALE%/%APP%/releases/");
 
 // app.update.promptWaitTime is in branding section
 
-// Show the Update Checking/Ready UI when the user was idle for x seconds
-pref("app.update.idletime", 60);
-
 // Whether or not to attempt using the service for updates.
 #ifdef MOZ_MAINTENANCE_SERVICE
 pref("app.update.service.enabled", true);
 #endif
 
 #ifdef XP_WIN
 // This pref prevents BITS from being used by Thunderbird to download updates.
 pref("app.update.BITS.enabled", false);
--- a/mail/base/content/aboutDialog-appUpdater.js
+++ b/mail/base/content/aboutDialog-appUpdater.js
@@ -38,26 +38,16 @@ function appUpdater(options = {}) {
   XPCOMUtils.defineLazyServiceGetter(this, "um",
                                      "@mozilla.org/updates/update-manager;1",
                                      "nsIUpdateManager");
 
   this.options = options;
   this.updateDeck = document.getElementById("updateDeck");
   this.promiseAutoUpdateSetting = null;
 
-  // Hide the update deck when the update window is already open and it's not
-  // already applied, to avoid syncing issues between them. Applied updates
-  // don't have any information to sync between the windows as they both just
-  // show the "Restart to continue"-type button.
-  if (Services.wm.getMostRecentWindow("Update:Wizard") &&
-      !this.isReadyForRestart) {
-    this.updateDeck.hidden = true;
-    return;
-  }
-
   this.bundle = Services.strings.
                 createBundle("chrome://messenger/locale/messenger.properties");
 
   let manualURL = Services.urlFormatter.formatURLPref("app.update.url.manual");
   document.getElementById("manualLink")
           .setAttribute("onclick", 'openURL("' + manualURL + '");');
   document.getElementById("failedLink")
           .setAttribute("onclick", 'openURL("' + manualURL + '");');
--- a/mail/base/modules/AppUpdateUI.jsm
+++ b/mail/base/modules/AppUpdateUI.jsm
@@ -290,21 +290,16 @@ const AppUpdateUI_Internal = {
       case "unsupported":
         this.clearCallbacks();
         this.showUnsupportedUpdateNotification(update, false);
         break;
     }
   },
 
   observe(subject, topic, status) {
-    // This can be removed after the old app update UI is removed.
-    if (!Services.prefs.getBoolPref("app.update.doorhanger", false)) {
-      return;
-    }
-
     let update = subject && subject.QueryInterface(Ci.nsIUpdate);
     switch (topic) {
       case "quit-application":
         for (let observer of this._obs) {
           Services.obs.removeObserver(this, observer);
         }
         break;
       case "update-available":