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:36:41 +0000 |
commit | 4359b2efa52ab524d70897a7dbe22d3dfb496de1 (patch) | |
tree | 92dce2f0a00fc2eaea8f3bcd2cd8999b373c9833 /src/com/android/providers/downloads | |
parent | f326c6242277ffddaed33c8c9e5e365cae4bfa12 (diff) | |
download | android_packages_providers_DownloadProvider-4359b2efa52ab524d70897a7dbe22d3dfb496de1.tar.gz android_packages_providers_DownloadProvider-4359b2efa52ab524d70897a7dbe22d3dfb496de1.tar.bz2 android_packages_providers_DownloadProvider-4359b2efa52ab524d70897a7dbe22d3dfb496de1.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
(cherry picked from commit 794ab54677c50bac5c0f32bc5d9ad768ff10c039)
Diffstat (limited to 'src/com/android/providers/downloads')
-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 |