From 70b5c30db87b3405e2e001c06c4a4a5dd6e25b72 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Fri, 5 Oct 2012 15:09:00 -0700 Subject: Skip scanning a file which will be deleted. When deleting a download, don't bother scanning it, since we'll just delete it moments later. This was already racy since it didn't even wait for the scan to complete. Bug: 7256243 Change-Id: I8c3b96823d94bc1688ef336cb45746ccd35fc760 --- src/com/android/providers/downloads/DownloadService.java | 3 --- 1 file changed, 3 deletions(-) (limited to 'src') diff --git a/src/com/android/providers/downloads/DownloadService.java b/src/com/android/providers/downloads/DownloadService.java index 7030deae..8380830a 100644 --- a/src/com/android/providers/downloads/DownloadService.java +++ b/src/com/android/providers/downloads/DownloadService.java @@ -479,9 +479,6 @@ public class DownloadService extends Service { */ private void deleteDownloadLocked(long id) { DownloadInfo info = mDownloads.get(id); - if (info.shouldScanFile()) { - scanFile(info, false, false); - } if (info.mStatus == Downloads.Impl.STATUS_RUNNING) { info.mStatus = Downloads.Impl.STATUS_CANCELED; } -- cgit v1.2.3