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.

#660
This commit is contained in:
Hans-Christoph Steiner 2016-05-21 00:00:29 +02:00
parent 3df44ce302
commit 478538690e

View File

@ -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;