Skip to content
Commit 684c02a7 authored by Sudheer Shanka's avatar Sudheer Shanka
Browse files

Don't ignore COLUMN_MEDIA_SCANNED values from caller.

Right now, DownloadProvider only uses the COLUMN_MEDIA_SCANNED
value if it is coming from addCompletedDownload and for the rest
of the requests, it ignores the incoming COLUMN_MEDIA_SCANNED value
and always invokes mediascanner. This is not what the documentation
says. For e.g., if the caller uses DownloadManager.setDestinationUri()
API, then unless otherwise specified, the download doesn't need to be
mediascanned.

Also, since we are inserting user visible downloads to MediaProvider,
use that info to populate the COLUMN_MEDIAPROVIDER_URI column as well
and update DownloadProvider to not invoke MediaScanner.

Bug: 123440050
Test: atest DownloadProviderTests
Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I65ccae672eabe2efd5132d4b105c18bb591379fc
parent f43f624e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment