From 4f514deca5d31e1d7e2c1c5923a3cda91d265959 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Sat, 21 May 2016 00:00:29 +0200 Subject: [PATCH] fix issue where first time installs do not work New installs where being caught up in the logic to check whether a download is still in progress after InstallManagerService got killed. Also checking whether Intent was just redelivered lets the new installs through while screening out the inactive Intents that were redelivered. This logic also cancels the notification for any download that was in progress when the InstallManagerService was killed. This was introduced in 5f3dde4060f5d472c #660 --- .../org/fdroid/fdroid/installer/InstallManagerService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/fdroid/fdroid/installer/InstallManagerService.java b/app/src/main/java/org/fdroid/fdroid/installer/InstallManagerService.java index 7a2091a9c..5b74a2217 100644 --- a/app/src/main/java/org/fdroid/fdroid/installer/InstallManagerService.java +++ b/app/src/main/java/org/fdroid/fdroid/installer/InstallManagerService.java @@ -154,7 +154,8 @@ public class InstallManagerService extends Service { return START_NOT_STICKY; } - if (!DownloaderService.isQueuedOrActive(urlString)) { + if ((flags & START_FLAG_REDELIVERY) == START_FLAG_REDELIVERY + && !DownloaderService.isQueuedOrActive(urlString)) { Utils.debugLog(TAG, urlString + " finished downloading while InstallManagerService was killed."); cancelNotification(urlString); return START_NOT_STICKY;