Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eecdf389 authored by Gabriele M's avatar Gabriele M
Browse files

Set status to INSTALLING when reconnecting to the service

Otherwise the service won't run in foreground after restarting
the app while an update is being installed.

Change-Id: I8a75d206ead2945e7326c144b0b4354fbb2accb4
parent 28644b34
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -67,6 +67,10 @@ class ABUpdateInstaller {
            switch (status) {
                case UpdateEngine.UpdateStatusConstants.DOWNLOADING:
                case UpdateEngine.UpdateStatusConstants.FINALIZING: {
                    if (update.getStatus() != UpdateStatus.INSTALLING) {
                        update.setStatus(UpdateStatus.INSTALLING);
                        mUpdaterController.notifyUpdateChange(mDownloadId);
                    }
                    int progress = Math.round(percent * 100);
                    mUpdaterController.getActualUpdate(mDownloadId).setInstallProgress(progress);
                    boolean finalizing = status == UpdateEngine.UpdateStatusConstants.FINALIZING;