summaryrefslogtreecommitdiffstats
path: root/src/com/android/providers
Commit message (Collapse)AuthorAgeFilesLines
* Add findDocumentPath support to DownloadStorageProvider.Garfield Tan2017-03-161-0/+17
| | | | | Bug: 36254483 Change-Id: Ia53312cd79673ee85d0385f50e8dfef4d7ace3d4
* Add rawDocumentsUri handling to TrampolineActivity.Ben Lin2017-03-103-18/+81
| | | | | | Test: Build, compiles, does not crash. Bug: 36033829 Change-Id: I8756c6abd872e4b14cff3c604c37f82323b44c27
* Deleting downloads for removed uids on downloadprovider startSuprabh Shukla2017-03-071-10/+45
| | | | | | | | | | | | | | | | After uninstalling an app, if the system was shutdown before the download provider received the broadcast for UID_REMOVED, another app installed later in the same uid might be able to gain access to the files downloaded by this app. Removing any such hanging downloads at the start up of the download provider should fix this issue. Test: Manually tested by uninstalling an app and killing and restarting the process android.process.media, to check that the downloaded files of the uninstalled app were deleted. Bug:22011579 Change-Id: I7382c4846f99035b40412a01715aee5873efa9e6
* Incorporating FileSystemProvider logic into DownloadStorageProvider.Ben Lin2017-02-241-89/+198
| | | | | | | | | | | | | | | This grants DownloadStorageProvider a couple of features: 1. Ability to now create folders 2. Surfacing raw file contents on disk under Shared Storage while avoiding duplicates from DownloadManager The following are kept: 1. Using DownloadManager as internal database to keep separation between raw files and user-downloaded files Test: build & smoke tested. Bug: 35157759 Change-Id: Id27e15e5bcb31ab1064ce9e3984f122754d1d5fd
* Only send DOWNLOAD_COMPLETE broadcast once.Jeff Sharkey2016-10-142-15/+25
| | | | | | | | | | | Apps might end up confused if we tell them a download was completed multiple times, so only send the broadcast exactly once when we transition it into a "completed" state, either during an update() or a delete() operation. Test: verified single broadcast with test app Bug: 31619480 Change-Id: I0b9139ea0e37f6d212b84314048692cd0c4f9cdf
* Launch APKs using content:// Uri with grant.Jeff Sharkey2016-10-031-13/+4
| | | | | | | | | | PackageInstaller now supports reading from content://, so always launch using that path. Include URI permission grants so the receiver can access the contents. Test: installed downloaded APK Bug: 31807780 Change-Id: I488d14872e80ce4a092e7db6e1c58f3fe54a54c6
* Remove support for archives from DownloadsProvider.Tomasz Mikolajewski2016-09-281-28/+0
| | | | | | Change-Id: I03d45952b63d7c4eb2e2451b81a791ec9c1ac88c Test: Compiles. Bug: 31783726
* Merge commit '010fc1856c23d5a15a6e42e334b0fdc7986f7f30' into ↵Jeff Sharkey2016-09-171-0/+44
|\ | | | | | | | | | | | | | | manual_merge_010fc18 am: e2c5d91b95 Change-Id: I5d3b829662449cc6068501c0cdf0f6b7bc67a8e5
| * Merge commit '010fc1856c23d5a15a6e42e334b0fdc7986f7f30' into ↵Jeff Sharkey2016-09-161-0/+44
| |\ | | | | | | | | | | | | | | | manual_merge_010fc18 Change-Id: I2fa7bbc82985a294564a072650f9e8472dae9694
| | * Merge commit '40238b9a601d58d2b4f88da7b14823e8c0340bc6' into ↵Jeff Sharkey2016-09-161-0/+44
| | |\ | | | | | | | | | | | | | | | | | | | | manual_merge_40238b9 Change-Id: I0d8441c4bae392726e7d41c77b1d9ac5eda1c09c
| | | * Enforce calling identity before clearing. am: 7c1af8c62c am: 47dcd095ea am: ↵Jeff Sharkey2016-09-161-0/+44
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 51033d49f6 am: 9bbd21ff0c am: 0bd9e49a06 am: 73721ade0d am: 36b9c38a53 Change-Id: I53525f314f5ebc659e26c972c62517833ea03e19
| | | | * Enforce calling identity before clearing. am: 7c1af8c62c am: 47dcd095ea am: ↵Jeff Sharkey2016-09-161-0/+44
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 51033d49f6 am: 9bbd21ff0c Change-Id: I5f09670f0629addb5fa847799184716020234f35
| | | | | * Enforce calling identity before clearing. am: 7c1af8c62c am: 47dcd095eaJeff Sharkey2016-09-161-0/+44
| | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 51033d49f6 Change-Id: Ic319b5f1f9351a83a2fde49aedc99f996fda8ef5
| | | | | | * Enforce calling identity before clearing.Jeff Sharkey2016-09-161-0/+44
| | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 7c1af8c62c Change-Id: Id435bda5c939ab48c3e1fb69f13292a4740828d4
| | | | | | | * Enforce calling identity before clearing.Jeff Sharkey2016-09-161-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When opening a downloaded file, enforce that the caller can actually see the requested download before clearing their identity to read internal columns. However, this means that we can no longer return the "my_downloads" paths: if those Uris were shared beyond the app that requested the download, access would be denied. Instead, we need to switch to using "all_downloads" Uris so that permission grants can be issued to third-party viewer apps. Since an app requesting a download doesn't normally have permission to "all_downloads" paths, we issue narrow grants toward the owner of each download, both at device boot and when new downloads are started. Bug: 30537115, 30945409 Change-Id: If944aada020878a91c363963728d0da9f6fae3ea
| * | | | | | | DO NOT MERGE: Listen to file changes on Downloads dir.Steve McKay2016-09-071-24/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And notify clients of Downloads when files on disk. Cherrypicked from: e398c096892fe8aac0c46374aec6bbe016c41016 and 2b011b97f96463c1f4a4f6b69c5bbe18ec0fc572 (followup changes due to autocommit commiting changes before completing nits). Bug: 28430547 Change-Id: I42a42bfb5e585918fe6b384a862699445afefcbc
| * | | | | | | Merge "DO NOT MERGE. Send "completed" broadcast if download cancelled." into ↵TreeHugger Robot2016-08-312-11/+22
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | nyc-mr1-dev
| | * | | | | | | DO NOT MERGE. Send "completed" broadcast if download cancelled.Jeff Sharkey2016-08-312-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a download is deleted, we may not have an active thread, so always send the broadcast from the provider. If an active thread encounters a deleted download, skip sending the broadcast twice. Change-Id: If8d5b99a1b7232bb64c6d11f22fdb4f5d6dbbfec Test: none Bug: 30883889 (cherry picked from commit efb1ac6b49692e62fde6830c3d20953c8632d2ba)
| * | | | | | | | DO NOT MERGE. Update notifications when deleting downloads.Jeff Sharkey2016-08-311-0/+6
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we end up leaving stale notifications around after the underlying download was deleted. Change-Id: Ie262a9dd369034de6c06be28b0eedc4231ea2e75 Test: none Bug: 30697605 (cherry picked from commit 3b7e099588a2697305fd52c342f404a03ec9a9ab)
| * | | | | | | Revert "Enforce calling identity before clearing." am: b440ceb00f am: ↵Adam Seaton2016-08-261-13/+0
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6777320335 am: a474af3a08 am: 8bec536bf2 am: 34ccbd80ea am: 956426bee5 am: 6a6944d1f4 am: 8e8770bdc8 am: 85a6e20a85 am: 465a080262 Change-Id: I57fa229406e76d733903b8bd9528bac53609cd34
| | * | | | | | | Revert "Enforce calling identity before clearing." am: b440ceb00f am: ↵Adam Seaton2016-08-261-13/+0
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6777320335 am: a474af3a08 am: 8bec536bf2 am: 34ccbd80ea am: 956426bee5 am: 6a6944d1f4 am: 8e8770bdc8 am: 85a6e20a85 Change-Id: I22493ee28ab8129b93eca671bb17c28cf8c4e830
| * | | | | | | | Merge "DO NOT MERGE: Check that file exists in disk in queryChildDocs" into ↵Steve McKay2016-08-231-2/+12
| |\ \ \ \ \ \ \ \ | | |/ / / / / / / | |/| | | | | | | | | | | | | | | | nyc-mr1-dev
* | | | | | | | | Merge "Fixed INetworkPolicyListener callbacks."TreeHugger Robot2016-09-071-9/+1
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | Fixed INetworkPolicyListener callbacks.Felipe Leme2016-08-241-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I0ac813875f73035c63d833294f85ee42306e8b95 Test: manual BUG: 28791717
* | | | | | | | | | Listen to file changes on Downloads dir.Steve McKay2016-09-061-25/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And notify clients of Downloads when files on disk. Cherrypicked from: e398c096892fe8aac0c46374aec6bbe016c41016 and 2b011b97f96463c1f4a4f6b69c5bbe18ec0fc572 (followup changes due to autocommit commiting changes before completing nits). Bug: 28430547 Change-Id: I42a42bfb5e585918fe6b384a862699445afefcbc
* | | | | | | | | | Revert "Enforce calling identity before clearing." am: b440ceb00f am: ↵Adam Seaton2016-08-261-13/+0
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6777320335 am: a474af3a08 am: 8bec536bf2 am: 34ccbd80ea am: 956426bee5 am: 6a6944d1f4 am: 8e8770bdc8 am: 85a6e20a85 am: 29c0025ae0 am: 9e119a0c29 Change-Id: Ic8495c5744b3acd16ae2d63be103279a2621411c
| * | | | | | | | | Revert "Enforce calling identity before clearing." am: b440ceb00f am: ↵Adam Seaton2016-08-261-13/+0
| |\ \ \ \ \ \ \ \ \ | | | |_|/ / / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6777320335 am: a474af3a08 am: 8bec536bf2 am: 34ccbd80ea am: 956426bee5 am: 6a6944d1f4 am: 8e8770bdc8 am: 85a6e20a85 am: 29c0025ae0 Change-Id: I499371da75801624d6591d413ba285f03570dd9b
| | * | | | | | | | Revert "Enforce calling identity before clearing." am: b440ceb00f am: ↵Adam Seaton2016-08-261-13/+0
| | |\ \ \ \ \ \ \ \ | | | | |_|/ / / / / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6777320335 am: a474af3a08 am: 8bec536bf2 am: 34ccbd80ea am: 956426bee5 am: 6a6944d1f4 am: 8e8770bdc8 Change-Id: I208036cd66780728f627cd11b2514eeb03c74800
| | | * | | | | | | Revert "Enforce calling identity before clearing." am: b440ceb00f am: ↵Adam Seaton2016-08-261-13/+0
| | | |\ \ \ \ \ \ \ | | | | | |_|/ / / / | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6777320335 am: a474af3a08 am: 8bec536bf2 am: 34ccbd80ea am: 956426bee5 am: 6a6944d1f4 Change-Id: Ib01cab89347d96c44478e51a27ef2cf17e1e7b2d
| | | | * | | | | | Revert "Enforce calling identity before clearing." am: b440ceb00f am: ↵Adam Seaton2016-08-261-13/+0
| | | | |\ \ \ \ \ \ | | | | | | |_|/ / / | | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6777320335 am: a474af3a08 am: 8bec536bf2 Change-Id: I81ea34a6f1cdaa438af6397651d7374628d44eff
| | | | | * | | | | Revert "Enforce calling identity before clearing." am: b440ceb00f am: 6777320335Adam Seaton2016-08-261-13/+0
| | | | | |\ \ \ \ \ | | | | | | | |_|/ / | | | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: a474af3a08 Change-Id: I133dc7915c5dfd0e2d70ece76c008c7b282f0bcb
| | | | | | * | | | Revert "Enforce calling identity before clearing."Adam Seaton2016-08-261-13/+0
| | | | | | |\ \ \ \ | | | | | | | | |_|/ | | | | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: b440ceb00f Change-Id: If9feec471d71fbfa05a4cf9a8633142c724b6da3
| | | | | | | * | | Revert "Enforce calling identity before clearing."Adam Seaton2016-08-261-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8be3a92eb0b4105a9ed748be5a937ce79145f565. Change-Id: I10401d57239b868f8e3514f81a0e20486838e29c
| * | | | | | | | | DO NOT MERGE: Check that file exists in disk in queryChildDocsJorge Gil2016-08-231-2/+12
| |\ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|/ / | |/| | | | | | | / | | | |_|_|_|_|_|/ | | |/| | | | | | | | | | | | | | | am: 314026d4e8 Change-Id: I3456cd39d299e97e9d2ef7ce200596bd829c3cdc
| | * | | | | | | DO NOT MERGE: Check that file exists in disk in queryChildDocsJorge Gil2016-08-081-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check that files returned from querying DownloadManager in queryChildDocuments and queryChildDocumentsForManage still exist in External Storage. Bug: 28430547 Change-Id: I4efe9f9ba79d41b3c3099fb96d18460880b742b5 (cherry picked from commit c45f4998c0b4f7ab44d3d2a180ca977ca2fa5ca8)
| * | | | | | | | Enforce calling identity before clearing. am: 8be3a92eb0 am: ec19fe6485 am: ↵Jeff Sharkey2016-08-091-0/+13
| |\ \ \ \ \ \ \ \ | | |/ / / / / / / | |/| / / / / / / | | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b3ce7976f2 am: 860239d87e am: 616f47abce am: a9ea617232 am: 567e549614 am: 14ae5650e4 am: 80ab64c562 Change-Id: I8ef0c4042a97682885897dc23c7a676d4d746ca6
* | | | | | | | Merge "Send "completed" broadcast if download cancelled."TreeHugger Robot2016-08-232-11/+22
|\ \ \ \ \ \ \ \
| * | | | | | | | Send "completed" broadcast if download cancelled.Jeff Sharkey2016-08-232-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a download is deleted, we may not have an active thread, so always send the broadcast from the provider. If an active thread encounters a deleted download, skip sending the broadcast twice. Change-Id: If8d5b99a1b7232bb64c6d11f22fdb4f5d6dbbfec Test: none Bug: 30883889
* | | | | | | | | Update notifications when deleting downloads.Jeff Sharkey2016-08-231-0/+6
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we end up leaving stale notifications around after the underlying download was deleted. Change-Id: Ie262a9dd369034de6c06be28b0eedc4231ea2e75 Test: none Bug: 30697605
* | | | | | | | Enforce calling identity before clearing. am: 8be3a92eb0 am: ec19fe6485 am: ↵Jeff Sharkey2016-08-091-0/+13
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b3ce7976f2 am: 860239d87e am: 616f47abce am: a9ea617232 am: 567e549614 am: 14ae5650e4 am: 80ab64c562 am: 77b7d90939 am: 7bd19160b1 Change-Id: I5f041155cf85feb81db55f2b23868754f270ac4d
| * \ \ \ \ \ \ \ Enforce calling identity before clearing. am: 8be3a92eb0 am: ec19fe6485 am: ↵Jeff Sharkey2016-08-091-0/+13
| |\ \ \ \ \ \ \ \ | | |/ / / / / / / | |/| / / / / / / | | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b3ce7976f2 am: 860239d87e am: 616f47abce am: a9ea617232 am: 567e549614 am: 14ae5650e4 am: 80ab64c562 am: 77b7d90939 Change-Id: I634d3d6d5918d2a65061e101ba1425735047184d
| | * | | | | | Enforce calling identity before clearing. am: 8be3a92eb0 am: ec19fe6485 am: ↵Jeff Sharkey2016-08-091-0/+13
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b3ce7976f2 am: 860239d87e am: 616f47abce am: a9ea617232 am: 567e549614 am: 14ae5650e4 Change-Id: I3688aa1ad8e48901b321823f03636bbd55d76780
| | | * | | | | Enforce calling identity before clearing. am: 8be3a92eb0 am: ec19fe6485 am: ↵Jeff Sharkey2016-08-091-0/+13
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b3ce7976f2 am: 860239d87e am: 616f47abce am: a9ea617232 am: 567e549614 Change-Id: I47ae3c7cfa1e3f6239d95697cf641c8d498a4e60
| | | | * | | | Enforce calling identity before clearing. am: 8be3a92eb0 am: ec19fe6485 am: ↵Jeff Sharkey2016-08-091-0/+13
| | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b3ce7976f2 am: 860239d87e Change-Id: Ic62206ad61c81da00eb57679211c140ce7053032
| | | | | * | | Enforce calling identity before clearing. am: 8be3a92eb0 am: ec19fe6485Jeff Sharkey2016-08-091-0/+13
| | | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: b3ce7976f2 Change-Id: I539882f08289cabaaf49326fb7973d98d0323de2
| | | | | | * | Enforce calling identity before clearing.Jeff Sharkey2016-08-091-0/+13
| | | | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 8be3a92eb0 Change-Id: I0b339abd106680e44a7e900e3eae514cf0f630c1
| | | | | | | * Enforce calling identity before clearing.Jeff Sharkey2016-08-011-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When opening a downloaded file, enforce that the caller can actually see the requested download before clearing their identity to read internal columns. Bug: 30537115 Change-Id: I01bbad7997e5e908bfb19f5d576860a24f59f295
| | | | | | | * Use resolved path for both checking and opening.Jeff Sharkey2016-01-142-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids a race condition where someone can change a symlink target after the security checks have passed. Bug: 26211054 Change-Id: I5842aaecc7b7d417a3b1902957b59b8a1f3c1ccb
| | | | | * | | Use resolved path for both checking and opening. am: bdc831357eJeff Sharkey2016-01-152-3/+8
| | | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 0e710ca30d * commit '0e710ca30d0b04843b3d2e83755e35fe092cfd4a': Use resolved path for both checking and opening.
| | | | | | * | Use resolved path for both checking and opening.Jeff Sharkey2016-01-142-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids a race condition where someone can change a symlink target after the security checks have passed. Bug: 26211054 Change-Id: I5842aaecc7b7d417a3b1902957b59b8a1f3c1ccb