diff options
author | Danesh Mondegarian <daneshm90@gmail.com> | 2015-04-20 23:28:14 -0700 |
---|---|---|
committer | Rajesh Yengisetty <rajesh@cyngn.com> | 2015-06-16 00:33:01 +0000 |
commit | 794ab54677c50bac5c0f32bc5d9ad768ff10c039 (patch) | |
tree | 59ab6fedbe9ee9d7ed7c88d91b659c2087ea2da0 | |
parent | cf0968dfea8fbde18ea35d49393ce4ea70fd6526 (diff) | |
download | android_packages_providers_DownloadProvider-794ab54677c50bac5c0f32bc5d9ad768ff10c039.tar.gz android_packages_providers_DownloadProvider-794ab54677c50bac5c0f32bc5d9ad768ff10c039.tar.bz2 android_packages_providers_DownloadProvider-794ab54677c50bac5c0f32bc5d9ad768ff10c039.zip |
DownloadManager : Only remove stale id if download is not deleted
This addresses the issue where if a download is enqueued and right after
deleted, the notification doesn't stick around.
Change-Id: Ie1ec08fc94420b0f46e1543ed52afd8c22aee372
-rw-r--r-- | src/com/android/providers/downloads/DownloadService.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/providers/downloads/DownloadService.java b/src/com/android/providers/downloads/DownloadService.java index 58cf380c..48aa2d84 100644 --- a/src/com/android/providers/downloads/DownloadService.java +++ b/src/com/android/providers/downloads/DownloadService.java @@ -364,7 +364,6 @@ public class DownloadService extends Service { final int idColumn = cursor.getColumnIndexOrThrow(Downloads.Impl._ID); while (cursor.moveToNext()) { final long id = cursor.getLong(idColumn); - staleIds.remove(id); DownloadInfo info = mDownloads.get(id); if (info != null) { @@ -396,6 +395,7 @@ public class DownloadService extends Service { isActive |= activeDownload; isActive |= activeScan; + staleIds.remove(id); } // Keep track of nearest next action |