Bug 923237 - Updater should immediately apply update when downloaded manually. r=snorp
authorMichael Boon <mtp.boon@gmail.com>
Mon, 02 Dec 2013 12:51:25 -0500
changeset 173964 2716ba96528cdca563b9bf5390b2d1fea4327a50
parent 173963 ea87ed77256e5ef44419887bf149230c6da11d8a
child 173965 f66fa95ae065213f4c453c906617d4093b23ae7e
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs923237
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 923237 - Updater should immediately apply update when downloaded manually. r=snorp
mobile/android/base/updater/UpdateService.java
--- a/mobile/android/base/updater/UpdateService.java
+++ b/mobile/android/base/updater/UpdateService.java
@@ -117,17 +117,18 @@ public class UpdateService extends Inten
             }
 
             registerForUpdates(false);
         } else if (UpdateServiceHelper.ACTION_CHECK_FOR_UPDATE.equals(intent.getAction())) {
             startUpdate(intent.getIntExtra(UpdateServiceHelper.EXTRA_UPDATE_FLAGS_NAME, 0));
             // Use this instead for forcing a download from about:fennec
             // startUpdate(UpdateServiceHelper.FLAG_FORCE_DOWNLOAD | UpdateServiceHelper.FLAG_REINSTALL);
         } else if (UpdateServiceHelper.ACTION_DOWNLOAD_UPDATE.equals(intent.getAction())) {
-            // We always want to do the download here
+            // We always want to do the download and apply it here
+            mApplyImmediately = true;
             startUpdate(UpdateServiceHelper.FLAG_FORCE_DOWNLOAD);
         } else if (UpdateServiceHelper.ACTION_APPLY_UPDATE.equals(intent.getAction())) {
             applyUpdate(intent.getStringExtra(UpdateServiceHelper.EXTRA_PACKAGE_PATH_NAME));
         }
     }
 
     private static boolean hasFlag(int flags, int flag) {
         return (flags & flag) == flag;