summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Add new no-op interface method." am: 726cb52790 am: 338dd4bda1Jeff Sharkey2018-01-191-1/+1
|\ | | | | | | | | | | am: 3a68c0ff91 Change-Id: If38cd52a3766aaadd43484ea1db58d74440b7428
| * Add new no-op interface method.Jeff Sharkey2018-01-181-1/+1
| | | | | | | | | | | | | | | | Test: bit FrameworksNetTests:android.net.,com.android.server.net. Test: bit FrameworksTelephonyTests:com.android.internal.telephony.dataconnection.DataConnectionTest Change-Id: Iebd6a6ad465f1b1d6678aefc3b146ea9bcd4b74e Exempt-From-Owner-Approval: trivial no-op overload Bug: 64133169
* | Move to NOT_ROAMING capability.Jeff Sharkey2017-11-093-9/+13
| | | | | | | | | | | | | | | | | | Checking new capability is perferred way to verify a network isn't roaming; isRoaming() is now deprecated. Test: bit DownloadProviderTests:* Bug: 68397798 Change-Id: I11d19fd5a389b52e199c604a6906423d405072e2
* | Provide data estimate to JobScheduler when known.Jeff Sharkey2017-10-251-0/+12
| | | | | | | | | | | | | | | | | | This gives the system better insight into the shape/size of network traffic that our download jobs will be doing. Test: verified via DownloadManager Bug: 67040695, 64133169 Change-Id: I7f77e693173fe0050ba6ca0353780a46e205ffcc
* | Use explicit Network from JobParameters.Jeff Sharkey2017-10-253-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | On devices with multiple active networks, or rapidly switching between networks, we need an API to tell jobs explicitly which network to use. (For example, the default route could meet all job criteria, but we could have changed the default network by the time we spun up the JobService.) Test: verified via DownloadManager Bug: 64133169 Change-Id: I9c131818d7199f79e147893d85c281473d00bee9
* | Prevent duplicate jobs for same download.Jeff Sharkey2017-09-282-3/+14
| | | | | | | | | | | | | | | | | | | | | | Before this CL, we could have started duplicate jobs for the same download ID in parallel. Now, we ignore duplicate jobs for the same download. This requires us to only reschedule a job after removing it from mActiveThreads, so slight refactoring there. Test: bit DownloadProviderTests:* Bug: 36227864 Change-Id: I3103480859c5eb9488817165187c5dae05b2d843
* | Close idle connections to release RAM am: 635e12dcdfFyodor Kupolov2017-09-081-0/+3
|\| | | | | | | | | | | am: ac5f1a587a Change-Id: I7e7d3652e056559226e79a27bdaa452469af88e4
| * Close idle connections to release RAMFyodor Kupolov2017-09-051-0/+3
| | | | | | | | | | | | | | | | | | Close idle connections after 30s of inactivity to release RAM. Savings: ~.2MB on marlin, ~0.1MB on low-ram devices Bug: 63398887 Test: reboot and dumpsys meminfo android.process.media Change-Id: If2505df7e654ab93cf64e6aeb7721c6f0a0134a5
| * Remove PDF Thumbnail support from DownloadStorageProviderJulian Mancini2017-08-311-1/+1
| | | | | | | | | | | | | | | | Exempt-From-Owner-Approval: Bug 63673347 Bug: 64225798 Test: Removing Functionality Change-Id: I052c2652d605101dc9df1a0b79162adb967d6250 (cherry picked from commit c87c31a602b5a27bd540fbedd8654cbeb24d06e9)
* | Download UI interactions should be in foreground. am: ae89e55bb0Jeff Sharkey2017-08-021-0/+4
|\| | | | | | | | | | | am: beaa58a237 Change-Id: Id27e5a2e553cbf4c900ff9e8cd1b9ae100a66426
| * Download UI interactions should be in foreground.Jeff Sharkey2017-08-021-0/+4
| | | | | | | | | | | | | | | | | | | | Otherwise these interactions risk getting stuck in a delayed background broadcast queue, and we'd re-post notifications based on stale data that hasn't been updated yet. Test: builds, boots Bug: 64098529 Change-Id: I93302e5a4380bb0ac8977153c3afaa02bcc36c84
* | Remove PDF Thumbnail support from DownloadStorageProviderJulian Mancini2017-08-021-1/+1
| | | | | | | | | | | | | | Exempt-From-Owner-Approval: Bug 63673347 Bug: 64225798 Test: Removing Functionality Change-Id: I052c2652d605101dc9df1a0b79162adb967d6250
* | Give root directory a name: Downloads :)Steve McKay2017-07-271-0/+3
| | | | | | | | | | | | Test: Build and see name in inspector. Exempt-From-Owner-Approval: Bug 63673347 Change-Id: Ic8de6ef10bc104266fb8bbd61867e2b9788aee29
* | Merge "Mark images in Downloads as supporting metadata."TreeHugger Robot2017-07-261-0/+4
|\ \
| * | Mark images in Downloads as supporting metadata.Steve McKay2017-07-251-0/+4
| |/ | | | | | | | | | | | | Bug: 62621970 Test: Build and manually test. Exempt-From-Owner-Approval: Bug 63673347 Change-Id: Iebed318ba65513da10f2e152e5232c46f97c1199
* | Merge "Move the null check before assigning parentId to root doc ID."TreeHugger Robot2017-07-211-3/+5
|\ \ | |/ |/|
| * Move the null check before assigning parentId to root doc ID.Garfield Tan2017-07-211-3/+5
| | | | | | | | | | | | | | Test: Manual test. Bug: 63901648 Exempt-From-Owner-Approval: Bug 63673347 Change-Id: I28c0abbb13900567b8e6693d11b3c82055205520
* | Merge "Allow pdf thumbnail in downloads root by removing an override"Jeff Sharkey2017-07-191-8/+0
|\ \
| * | Allow pdf thumbnail in downloads root by removing an overrideJulian Mancini2017-07-191-8/+0
| |/ | | | | | | | | | | | | Bug: 63586859 Test: N/A Exempt-From-Owner-Approval: Bug 63673347 Change-Id: I9ea2c051485b2b6dd87dac4dac73dba6dbf59fd6
* | Merge "Allow DownloadStorageProvider to display PDF Thumbnails"TreeHugger Robot2017-07-191-1/+1
|\ \
| * | Allow DownloadStorageProvider to display PDF ThumbnailsJulian Mancini2017-07-191-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | Due to changes to FileStorageProvider (linked in Topic), DownloadStorageProvider also needed a small update so that any PDF documents have FLAG_SUPPORTS_THUMBNAIL enabled. Bug: 63586859 Test: None Exempt-From-Owner-Approval: Bug 63673347 Change-Id: Ic88640df73944b739def3ad82d3c37457e22abd7
* | Downgrade "Downloading" notification channel to MIN am: b0a086c29fGeoffrey Pitsch2017-07-181-1/+1
|\ \ | | | | | | | | | | | | | | | am: 726919cd92 Change-Id: Id054a1577d019f257da1a3f1575b47143e15382f
| * | Downgrade "Downloading" notification channel to MINGeoffrey Pitsch2017-07-171-1/+1
| |/ | | | | | | | | | | | | | | Won't impact devices that have already created the channel. Bug: 63755460 Test: N/A Change-Id: I3930ccf67bc5594493e1d10e48fc43fded104ebf
* | Allocate space using new StorageManager API.Jeff Sharkey2017-07-156-230/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of reaching directly into PackageManager, use the new StorageManager API to allocate disk space for downloads. This wraps both clearing cached files and fallocate() into a single method. Remove support for storing downloads on the /cache partition, which doesn't exist on many devices. Bug: 63057877 Test: bit DownloadProviderTests:* Exempt-From-Owner-Approval: Bug 63673347 Change-Id: I5749f7a2f7ded9157fea763dc652bf4da88d86ff
* | Follow removal of NetworkInfo metered flag.Jeff Sharkey2017-07-143-2/+12
|/ | | | | | | | | | The OS now completely relies on NET_CAPABILITY_NOT_METERED to avoid confusion and staleness. Bug: 63391323 Test: builds, boots, Wi-Fi policy is upgraded Exempt-From-Owner-Approval: Bug 63673347 Change-Id: Iea83e0afd8cbd2be10d85b8a35c903047716b5b9
* Not sending my uid as ORIGINATING_UID to package installerSuprabh Shukla2017-06-011-1/+5
| | | | | | | | | | | | In some cases the UID column may have download provider uid. We should not send this as the originating uid for blaming app installs. Test: Manually copied an apk to internal storage and back to downloads. Tapping on apk launches package installer as expected. Fixes: 38310830 Change-Id: Ie75da734b1bd43bc61112c023cb1587e4c2ff20e
* Add FLAG_SUPPORTS_IS_CHILD to DownloadStorageProvider.Ben Lin2017-05-251-1/+2
| | | | | | Test: DocumentsUI shows Downloads when invoked via ACTION_OPEN_TREE. Bug: 62087271 Change-Id: Ia48d912d6920b7dfcb280aadf212d34d109f31af
* Only alert when first showing.Jeff Sharkey2017-04-191-0/+1
| | | | | | Test: builds, boots Bug: 37493685 Change-Id: I76cea80de092f99615b4a42058f2abf5f9cdb797
* Merge "Keep shared downloads when apps are uninstalled." into oc-devTreeHugger Robot2017-04-193-8/+20
|\
| * Keep shared downloads when apps are uninstalled.Jeff Sharkey2017-04-183-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | When an app downloads files to external storage, keep those downloads around for the user to enjoy after the app is uninstalled. We still end up deleting files stored in internal cache directories, and under package-specific directories on external storage. Test: builds, boots, downloads on external storage remain Bug: 30868200 Change-Id: Ib70f42aa764a8252fe67c6fba9d60b3350f5d5a4
* | Create notification channels for downloads.Jeff Sharkey2017-04-181-12/+31
|/ | | | | | | | We tell the user about active, completed, and waiting downloads. Test: builds, boots, downloads work Bug: 36865435 Change-Id: Id5db029a98971a7b7d190f01eea2439120c18531
* Check for Downloads dir's existence and create it if it doesn't exist.Ben Lin2017-03-311-2/+5
| | | | | | | | | | | | It's possible that Downloads directory (for whatever reason) is not available on disk, and thus all sorts of bugs happen (Can't create folder/files, can't query files inside the folder). This will make sure if DownloadStorageProvider#queryRoot is called, then we will create the folder. Test: Builds. Bug: 35930004 Change-Id: I517ac20c1865f356912decd92a591a37d52ba90b
* 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)