summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2013-10-04 16:41:10 -0700
committerJeff Sharkey <jsharkey@android.com>2013-10-04 16:41:10 -0700
commit9770a3c402da1e09f3a5143f089173805edff32b (patch)
tree6b0ae4769bee5c89c7e4134480d4a394babcfdcd
parent1225c34df262ece7a9f95ee5fe61c1985bf16df1 (diff)
downloadandroid_packages_providers_DownloadProvider-9770a3c402da1e09f3a5143f089173805edff32b.zip
android_packages_providers_DownloadProvider-9770a3c402da1e09f3a5143f089173805edff32b.tar.gz
android_packages_providers_DownloadProvider-9770a3c402da1e09f3a5143f089173805edff32b.tar.bz2
Treat deleted in-progress downloads as canceled.
Otherwise the download thread would keep going! Bug: 11081405 Change-Id: Ib8f1b624b29cabc782b8a0047d7b5db7e39a17de
-rw-r--r--src/com/android/providers/downloads/DownloadThread.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/providers/downloads/DownloadThread.java b/src/com/android/providers/downloads/DownloadThread.java
index def4d7f..93f8d65 100644
--- a/src/com/android/providers/downloads/DownloadThread.java
+++ b/src/com/android/providers/downloads/DownloadThread.java
@@ -519,7 +519,7 @@ public class DownloadThread implements Runnable {
throw new StopRequestException(
Downloads.Impl.STATUS_PAUSED_BY_APP, "download paused by owner");
}
- if (mInfo.mStatus == Downloads.Impl.STATUS_CANCELED) {
+ if (mInfo.mStatus == Downloads.Impl.STATUS_CANCELED || mInfo.mDeleted) {
throw new StopRequestException(Downloads.Impl.STATUS_CANCELED, "download canceled");
}
}