summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/providers/downloads/DownloadInfo.java4
-rw-r--r--src/com/android/providers/downloads/DownloadThread.java5
2 files changed, 5 insertions, 4 deletions
diff --git a/src/com/android/providers/downloads/DownloadInfo.java b/src/com/android/providers/downloads/DownloadInfo.java
index 00a2dd78..c571de4d 100644
--- a/src/com/android/providers/downloads/DownloadInfo.java
+++ b/src/com/android/providers/downloads/DownloadInfo.java
@@ -448,12 +448,12 @@ public class DownloadInfo {
/**
* Returns whether a file should be scanned
*/
- public boolean shouldScanFile() {
+ public boolean shouldScanFile(int status) {
return (mMediaScanned == 0)
&& (mDestination == Downloads.Impl.DESTINATION_EXTERNAL ||
mDestination == Downloads.Impl.DESTINATION_FILE_URI ||
mDestination == Downloads.Impl.DESTINATION_NON_DOWNLOADMANAGER_DOWNLOAD)
- && Downloads.Impl.isStatusSuccess(mStatus);
+ && Downloads.Impl.isStatusSuccess(status);
}
/**
diff --git a/src/com/android/providers/downloads/DownloadThread.java b/src/com/android/providers/downloads/DownloadThread.java
index 60a04ff1..40194038 100644
--- a/src/com/android/providers/downloads/DownloadThread.java
+++ b/src/com/android/providers/downloads/DownloadThread.java
@@ -383,8 +383,9 @@ public class DownloadThread extends Thread {
if (Downloads.Impl.isStatusCompleted(mInfoDelta.mStatus)) {
mInfo.sendIntentIfRequested();
- if (mInfo.shouldScanFile()) {
- DownloadScanner.requestScanBlocking(mContext, mInfo);
+ if (mInfo.shouldScanFile(mInfoDelta.mStatus)) {
+ DownloadScanner.requestScanBlocking(mContext, mInfo.mId, mInfoDelta.mFileName,
+ mInfoDelta.mMimeType);
}
} else if (mInfoDelta.mStatus == STATUS_WAITING_TO_RETRY
|| mInfoDelta.mStatus == STATUS_WAITING_FOR_NETWORK