Copy the updates for uncrypt using a Service

Same as change I488018d01c0baf74660362a384e53bfe5d85de2b
("Use a service to export the updates"). While at it, move the code
out of UpdaterService to better separate the code that deal with AB
updates and regular updates.

Change-Id: I2bc3e78e80f5e63c57303cbbcdc0353dbab0f67f
This commit is contained in:
Gabriele M
2017-11-30 23:41:00 +01:00
parent e66a8fa53a
commit e02b8a0b00
8 changed files with 181 additions and 128 deletions

View File

@@ -534,11 +534,18 @@ public class UpdaterController implements Controller {
@Override
public boolean isInstallingUpdate() {
return ABUpdateInstaller.isInstallingUpdate(mContext);
return UpdateInstaller.isInstalling() ||
ABUpdateInstaller.isInstallingUpdate(mContext);
}
@Override
public boolean isInstallingUpdate(String downloadId) {
return ABUpdateInstaller.isInstallingUpdate(mContext, downloadId);
return UpdateInstaller.isInstalling(downloadId) ||
ABUpdateInstaller.isInstallingUpdate(mContext, downloadId);
}
@Override
public boolean isInstallingABUpdate() {
return ABUpdateInstaller.isInstallingUpdate(mContext);
}
}