when canceling download, delay removeApk() until its no longer needed

This was deleting the Apk from appMapping too fast, so the later status
updates couldn't be sent.
This commit is contained in:
Hans-Christoph Steiner 2018-07-20 22:26:46 +02:00
parent 2ff47ed5c3
commit d1cbbe72d7
2 changed files with 1 additions and 1 deletions

View File

@ -427,6 +427,7 @@ public final class AppUpdateStatusManager {
entry.errorText = errorText;
entry.intent = null;
notifyChange(entry, true);
removeApk(url);
}
}
}

View File

@ -176,7 +176,6 @@ public class InstallManagerService extends Service {
DownloaderService.cancel(this, apk.getPatchObbUrl());
DownloaderService.cancel(this, apk.getMainObbUrl());
}
appUpdateStatusManager.removeApk(urlString);
return START_NOT_STICKY;
} else if (ACTION_INSTALL.equals(action)) {
if (!isPendingInstall(urlString)) {