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
This commit is contained in:
Hans-Christoph Steiner 2016-05-21 00:00:29 +02:00
parent cd9ad9cdbf
commit 4f514deca5

View File

@ -154,7 +154,8 @@ public class InstallManagerService extends Service {
return START_NOT_STICKY; 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."); Utils.debugLog(TAG, urlString + " finished downloading while InstallManagerService was killed.");
cancelNotification(urlString); cancelNotification(urlString);
return START_NOT_STICKY; return START_NOT_STICKY;