History log of /packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/DownloadProviderFunctionalTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/DownloadProviderFunctionalTest.java
57b29e71e0dafa2a9d0ff1dc953796d7a350072f 19-Apr-2016 Narayan Kamath <narayan@google.com> Tidy up uses of Integer.valueOf.

Use parseInt when the result is assigned to an int. Allocates fewer
objects.

bug: 28078871
Change-Id: I2c58112795fecce6395c558f2bb1e1fefe83a5bf
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/DownloadProviderFunctionalTest.java
f5c662d5ac2ffc887660ff2957dfe4e1e8abc56a 27-Mar-2015 Alex Klyubin <klyubin@google.com> Make DownloadProvider honor the cleartext traffic policy.

This makes the Provider-side of the DownloadManager framework honor
the per-UID cleartext network traffic policy. The policy is enforced
in the Provider rather than in its client (DownloadManager) because
download URLs could get redirected between HTTPS and HTTP and only
the Provider currently has visibility into and control over this.

Whether cleartext network traffic is permitted is a per-package
policy. However, the DownloadProvider can only access the UID of the
requesting application. Multiple packages can run under the same UID.
In that scenario, cleartext traffic is permited for the UID if
cleartext traffic is permitted for any of the packages running under
the UID. This could be improved by making the DownloadManager provide
the package name in addition to the UID.

Bug: 19215516
Change-Id: Ib37585a7a2fc2869954d52a1b08052926f49bc9b
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/DownloadProviderFunctionalTest.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/DownloadProviderFunctionalTest.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/DownloadProviderFunctionalTest.java
52b703c5d0c4cff72bafdec0e2229368d3cc20d0 13-Nov-2012 Jeff Sharkey <jsharkey@android.com> Show remaining time in download notifications.

Calculate speed of in-progress downloads and estimate time remaining
until completion. Uses a moving average that is weighted 1:1 with
the most recent 500ms sample. Funnels timing data to notifications
through DownloadHandler.

Bug: 6777872
Change-Id: I9155f2979aa330bd1172f63bbfca1d053815cee5
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/DownloadProviderFunctionalTest.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/DownloadProviderFunctionalTest.java