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:
@@ -67,6 +67,10 @@ class ABUpdateInstaller {
|
|||||||
switch (status) {
|
switch (status) {
|
||||||
case UpdateEngine.UpdateStatusConstants.DOWNLOADING:
|
case UpdateEngine.UpdateStatusConstants.DOWNLOADING:
|
||||||
case UpdateEngine.UpdateStatusConstants.FINALIZING: {
|
case UpdateEngine.UpdateStatusConstants.FINALIZING: {
|
||||||
|
if (update.getStatus() != UpdateStatus.INSTALLING) {
|
||||||
|
update.setStatus(UpdateStatus.INSTALLING);
|
||||||
|
mUpdaterController.notifyUpdateChange(mDownloadId);
|
||||||
|
}
|
||||||
int progress = Math.round(percent * 100);
|
int progress = Math.round(percent * 100);
|
||||||
mUpdaterController.getActualUpdate(mDownloadId).setInstallProgress(progress);
|
mUpdaterController.getActualUpdate(mDownloadId).setInstallProgress(progress);
|
||||||
boolean finalizing = status == UpdateEngine.UpdateStatusConstants.FINALIZING;
|
boolean finalizing = status == UpdateEngine.UpdateStatusConstants.FINALIZING;
|
||||||
|
Reference in New Issue
Block a user