Commit 70b5c30d authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

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
parent b92aa3a8
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment