summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanesh Mondegarian <daneshm90@gmail.com>2015-04-20 23:28:14 -0700
committerRajesh Yengisetty <rajesh@cyngn.com>2015-06-16 00:36:41 +0000
commit4359b2efa52ab524d70897a7dbe22d3dfb496de1 (patch)
tree92dce2f0a00fc2eaea8f3bcd2cd8999b373c9833
parentf326c6242277ffddaed33c8c9e5e365cae4bfa12 (diff)
downloadandroid_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)
-rw-r--r--src/com/android/providers/downloads/DownloadService.java2
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