summaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/providers/downloads/StorageTest.java
Commit message (Collapse)AuthorAgeFilesLines
* Allocate space using new StorageManager API.Jeff Sharkey2017-07-151-249/+0
| | | | | | | | | | | | | | 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
* Add tag to downloadprovider storage tests to run in apctMd Haque2016-03-241-0/+2
| | | | Change-Id: I9b2711c2a9b3edd4bbef97ff6cdcae9fdc9ef433
* Move internal DownloadProvider code off libcore.os.Elliott Hughes2014-04-281-7/+6
| | | | | | (As much as possible. There are no plans to make the mocking API public.) Change-Id: I348877b850d6d34572d5a19e67952254bc4f12ef
* fix test buildsColin Cross2014-04-241-2/+2
| | | | | | | StructStatVfs and ErrnoException were moved from libcore.io to android.system Change-Id: I42c789a941f964ae7dde224b16af39a95212fbc7
* Many improvements to download storage management.Jeff Sharkey2014-02-061-0/+248
Change all data transfer to occur through FileDescriptors instead of relying on local files. This paves the way for downloading directly to content:// Uris in the future. Rewrite storage management logic to preflight download when size is known. If enough space is found, immediately reserve the space with fallocate(), advising the kernel block allocator to try giving us a contiguous block regions to reduce fragmentation. When preflighting on internal storage or emulated external storage, ask PackageManager to clear private app caches to free up space. Since we fallocate() the entire file, use the database as the source of truth for resume locations, which requires that we fsync() before each database update. Store in-progress downloads in separate directories to keep the OS from deleting out from under us. Clean up filename generation logic to break ties in this new dual-directory case. Clearer enforcement of successful download preconditions around content lengths and ETags. Move all database field mutations to clearer DownloadInfoDelta object, and write back through single code path. Catch and log uncaught exceptions from DownloadThread. Tests to verify new storage behaviors. Fixed existing test to reflect correct RFC behavior. Bug: 5287571, 3213677, 12663412 Change-Id: I6bb905eca7c7d1a6bc88df3db28b65d70f660221