summaryrefslogtreecommitdiffstats
path: root/src/com/android/providers/downloads/DownloadThread.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/providers/downloads/DownloadThread.java')
-rw-r--r--src/com/android/providers/downloads/DownloadThread.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/providers/downloads/DownloadThread.java b/src/com/android/providers/downloads/DownloadThread.java
index 40194038..33436f57 100644
--- a/src/com/android/providers/downloads/DownloadThread.java
+++ b/src/com/android/providers/downloads/DownloadThread.java
@@ -382,7 +382,11 @@ public class DownloadThread extends Thread {
}
if (Downloads.Impl.isStatusCompleted(mInfoDelta.mStatus)) {
- mInfo.sendIntentIfRequested();
+ // If download was canceled, we already sent requested intent when
+ // deleted in the provider
+ if (mInfoDelta.mStatus != STATUS_CANCELED) {
+ mInfo.sendIntentIfRequested();
+ }
if (mInfo.shouldScanFile(mInfoDelta.mStatus)) {
DownloadScanner.requestScanBlocking(mContext, mInfo.mId, mInfoDelta.mFileName,
mInfoDelta.mMimeType);