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
This commit is contained in:
Gabriele M
2018-04-05 16:37:49 +02:00
parent 28644b3491
commit eecdf389ef
@@ -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;