3a5f5eafb34eaa4963c801882148e8f61514a61b |
|
21-Apr-2016 |
Jeff Sharkey <jsharkey@android.com> |
Move DownloadManager to use JobScheduler. JobScheduler is in a much better position to coordinate tasks across the platform to optimize battery and RAM usage. This change removes a bunch of manual scheduling logic by representing each download as a separate job with relevant scheduling constraints. Requested network types, retry backoff timing, and newly added charging and idle constraints are plumbed through as job parameters. When a job times out, we halt the download and schedule it to resume later. The majority of downloads should have ETag values to enable resuming like this. Remove local wakelocks, since the platform now acquires and blames our jobs on the requesting app. When an active download is pushing updates to the database, check for both paused and cancelled state to quickly halt an ongoing download. Shift DownloadNotifier to update directly based on a Cursor, since we no longer have the overhead of fully-parsed DownloadInfo objects. Unify a handful of worker threads into a single shared thread. Remove legacy "large download" activity that was thrown in the face of the user; the UX best-practice is to go through notification, and update that dialog to let the user override and continue if under the hard limit. Bug: 28098882, 26571724 Change-Id: I33ebe59b3c2ea9c89ec526f70b1950c734abc4a7
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java
|
6971133998ddc8c8c6b37b2fdaaec1d3ed152e90 |
|
19-Jun-2015 |
Oren Blasberg <orenb@google.com> |
Add "Cancel" action to downloads in notification. Add a "Cancel" action to in-progress downloads shown in notification pane. We add a new action type for a new "cancel" intent sent by DownloadNotifier to DownloadReceiver, which in turn cancels the download by way of DownloadManager. BUG=19972464 Change-Id: I83cd2f40e1442c327f756027b99f9eac913a0e70
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java
|
dffbb9c4567e9d29d19964a83129e38dceab7055 |
|
31-Jan-2014 |
Jeff Sharkey <jsharkey@android.com> |
Many improvements to download storage management. 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
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java
|
323f5ae0cafdc72f61defefaa5ba938f1b4d0dda |
|
03-Apr-2013 |
Jeff Sharkey <jsharkey@android.com> |
Follow MockWebServer API changes. Change-Id: Icaba016bc6e098745e56a3b6367a8a6af0151158
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java
|
1b5c0091270cdc04054c9a2af33ba4f94d652cff |
|
21-Mar-2013 |
Jeff Sharkey <jsharkey@android.com> |
Start using MockStreamResponse. Change-Id: Ida4a0a85883ccd6763b07e958ddc6ecf7eedf790
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java
|
925976230936a5177365dc24b50da8607a9af8d4 |
|
12-Feb-2013 |
Jeff Sharkey <jsharkey@android.com> |
Redesign of DownloadManager update loop. Previously, the service lifecycle was managed through a large for() loop which was extremely tricky to reason about. This resulted in several race conditions that could leave the service running indefinitely, or terminate it early before tasks had finished. This change redesigns the update loop to be event driven based on database updates, and to collapse mutiple pending update passes. It is much easier to reason about service termination conditions, and it correctly uses startId to handle races during command delivery. Also moves scanner into isolated class, and switches to using public API instead of binding to private interface. Bug: 7638470, 7455406, 7162341 Change-Id: I380e77f5432223b2acb4e819e37f29f98ee4782b
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java
|
70c0e1eff5ff7cd5051738f76cecd6cb87353a43 |
|
01-Feb-2013 |
Jeff Sharkey <jsharkey@android.com> |
Migrate to using Mockito directly. Change-Id: Ice24d5c62bbcbcfd3d7374eac3a20580f7f31f36
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java
|
58eee87b70862a7ced85eabc3c225fad24664065 |
|
29-Jan-2013 |
Jeff Sharkey <jsharkey@android.com> |
Tests for max retries/redirects, ETag switches. Verify that servers responding with many retries or redirects result in failed download, instead of spinning out of control. Test to verify that changed ETag results in download failing. Also fix handling of HTTP 301 to update Uri in database. Change-Id: Iff2948d79961a245b7900117d107edaa356618c9
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java
|
8ac10e0e0667a4fe35191deebb5fa9786bf4226c |
|
04-Jan-2013 |
Jeff Sharkey <jsharkey@android.com> |
Clean up DownloadManager threading tests. Change runUntilStatus() methods to polling with timeout instead of requiring internal knowledge about threading. Fix notification tests, and move opening of InputStream until after handling headers to avoid FNFE. Always reset facade to defaults before each test. Change-Id: I6b2d6cfc4e685d2090c1133b1b2e89ae12760f8b
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java
|
36612d27b67ff2e79ffff8eb12d95d2058abde02 |
|
25-Jul-2012 |
Jeff Sharkey <jsharkey@android.com> |
Move notification tests to LittleMock. Directly mock NotificationManager instead of using SystemFacade. Change-Id: If932d26e23816e8674469c275a828701cce5fc2d
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java
|
ae6856b0fca5215f45619dd031a7e7beae7bd8cc |
|
29-Mar-2012 |
Jeff Sharkey <jsharkey@android.com> |
Migrate to shared MockWebServer. Bug: 4726601 Change-Id: Ibe537bd5c2a092dbf974360cd454751881f7f4ea
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java
|