diff options
author | Jeff Sharkey <jsharkey@android.com> | 2017-07-15 12:23:05 -0600 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2017-07-15 15:04:30 -0600 |
commit | d635ac295850ba23d528c02b1e5c6eb44b64b22b (patch) | |
tree | 4c371e93cf162adffcb891752bdeb3f902252d18 /src/com/android/providers/downloads/Helpers.java | |
parent | c442fbd95ad5b3de9e58a11e431f419edb4fe978 (diff) | |
download | android_packages_providers_DownloadProvider-d635ac295850ba23d528c02b1e5c6eb44b64b22b.tar.gz android_packages_providers_DownloadProvider-d635ac295850ba23d528c02b1e5c6eb44b64b22b.tar.bz2 android_packages_providers_DownloadProvider-d635ac295850ba23d528c02b1e5c6eb44b64b22b.zip |
Allocate space using new StorageManager API.
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
Diffstat (limited to 'src/com/android/providers/downloads/Helpers.java')
-rw-r--r-- | src/com/android/providers/downloads/Helpers.java | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/com/android/providers/downloads/Helpers.java b/src/com/android/providers/downloads/Helpers.java index 7354076b..2b55eb87 100644 --- a/src/com/android/providers/downloads/Helpers.java +++ b/src/com/android/providers/downloads/Helpers.java @@ -556,14 +556,6 @@ public class Helpers { return context.getCacheDir(); } - case Downloads.Impl.DESTINATION_SYSTEMCACHE_PARTITION: - if (running) { - return new File(Environment.getDownloadCacheDirectory(), - Constants.DIRECTORY_CACHE_RUNNING); - } else { - return Environment.getDownloadCacheDirectory(); - } - case Downloads.Impl.DESTINATION_EXTERNAL: final File target = new File( Environment.getExternalStorageDirectory(), Environment.DIRECTORY_DOWNLOADS); |