| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\| |
| | |
| | |
| | |
| | |
| | |
| | | |
Merge commit '176a74426f750dc56e7d200a4cdc3b6ed75fe6cd'
* commit '176a74426f750dc56e7d200a4cdc3b6ed75fe6cd':
New URI structure with "my_downloads" and "all_downloads"
|
| |\|
| | |
| | |
| | | |
Change-Id: I18ede2f2d5ad8aa40cd61bdb7213659d356fdf57
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This change introduces a second view into the download manager
database via a set of URIs starting with /all_downloads, renaming the
original /download URIs to /my_downloads. In addition to making
things more clear, this change allows the downloads UI to grant
permissions on individual downloads to viewer apps.
The old semantics were:
* for ordinary callers, /download included only downloads initiated by
the calling UID
* for intraprocess calls or calls by root, /download included all
downloads
The new semantics are
* /my_downloads always includes only downloads initiated by the
calling UID, and requires only INTERNET permission. It could just
as well require no permission, but that's not possible in the
framework, since path-permissions can only broaden access, not
tighten it. It doesn't matter, because these URIs are useless
without INTERNET permission -- if a user can't initiate downloads,
there's no reason to read this.
* /all_downloads always includes all downloads on the system, and
requires the new permission ACCESS_ALL_DOWNLOADS. This permission
is currently protectionLevel=signature -- this could be relaxed
later to support third-party download managers.
All download manager code has been changed to use /all_downloads URIs,
except when passing a URI to another app. In making this change
across the download manager code, I've taken some liberties in
cleaning things up. Other apps are unchanged and will use
/my_downloads.
Finally, this incorporates changes to DownloadManager to return a
content URI for /cache downloads -- the download UI no longer assumes
it's a file URI, and it grants permissions to the receiver of the VIEW
intent. The public API test has also been updated.
I've also fixed some null cursor checking in DownloadManager.
Change-Id: I05a501eb4388249fe80c43724405657c950d7238
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
notifications." into gingerbread
Merge commit 'd5c0120af6eae66f15e83ef61eb61ea19542b097'
* commit 'd5c0120af6eae66f15e83ef61eb61ea19542b097':
Fix silly bug with completed notifications.
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
gingerbread
Merge commit '13db200521cf8ead0d96173bccd7e141182eeccd' into gingerbread-plus-aosp
* commit '13db200521cf8ead0d96173bccd7e141182eeccd':
Fix silly bug with completed notifications.
|
| | |\ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This functionality isn't part of the public API, hence it lacks test
coverage. Rather than adding tests, I'm inclined to leave it and
hopefully we'll be able to migrate existing apps to the public API
soon enough.
Change-Id: I1210c6525dfb7cb12c1b8e35c04684060d3ad87e
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Merge commit '7fa71b17d1bcaceb4688cb4b0e6982d1db4a0538'
* commit '7fa71b17d1bcaceb4688cb4b0e6982d1db4a0538':
Further work on the new downloads UI.
|
| |\| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Merge commit '71e7fda9135a0915af1fd419d07ebf85ad09beb4' into gingerbread-plus-aosp
* commit '71e7fda9135a0915af1fd419d07ebf85ad09beb4':
Further work on the new downloads UI.
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* add support for downloads not visible in the UI
* add support for restarting failed downloads and downloads for which
the file is missing
* add "clear selection" button to selection menu
* fix DateSortedExpandableListAdapter to ensure the view refreshes
properly anytime the underlying data changes
* make DownloadList handle when a selected download gets deleted by
another app
* make DownloadList close a dialog for a pending download when the
download starts
* show a dialog when the user tries to open a download but the
file is missing
* display "<Unknown>" when no title is provided for a download
* add a test case for DownloadManager.orderBy() (should've gone in the
previous commit)
Change-Id: Ibf3062e8228e7f2c1270be24d8d5527dfb064658
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
characters
Merge commit 'caab8ef3d5eac4b64aef7042078a542bb52f3bda'
* commit 'caab8ef3d5eac4b64aef7042078a542bb52f3bda':
Added support for downloading files with unicode characters
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Merge commit '89e4816fe5f06f4bc2c2fe0e38e63c7fbe468cd7' into gingerbread-plus-aosp
* commit '89e4816fe5f06f4bc2c2fe0e38e63c7fbe468cd7':
Added support for downloading files with unicode characters
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Currently only certain ASCII characters are allowed in a filename, all
other characters are replaced with an underscore. This gives bad
usability for foreign languages (e.g. japanese). This fix replaces the
current regexp with a method which replaces only those characters unsafe
to be used on VFAT filesystems (should work on most other
filesystems as well).
Change-Id: I114d47b4b35f28490e6b12493138355532fda499
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Merge commit '9877c7f8414bfa1feb49b2afe166f99fff678794'
* commit '9877c7f8414bfa1feb49b2afe166f99fff678794':
Add UI message when queued for wifi due to size.
|
| |\ \ \
| | | |/
| | |/|
| | | |
| | | |
| | | |
| | | | |
Merge commit '97d590d5a1f583acb7992d20851bdc6cd0454d12' into gingerbread-plus-aosp
* commit '97d590d5a1f583acb7992d20851bdc6cd0454d12':
Add UI message when queued for wifi due to size.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
As it stands, when a download is paused because it's too big to
proceed over mobile, and must proceed over wifi, it looks like any
other paused download, with no indication of why it's paused. That
may be passable for most other reasons for pausing a download, but it
seems too confusing for this case. So this change adds a simple
string message that replaces the progress bar when a download is
paused for this reason (the icon also changes to a warning).
The implementation isn't beautiful and could use some improvement, but
I think it's acceptable and necessary. The exact UI design and
wording are certainly open to change.
Change-Id: I753d57f463e2614b5694bdc178d2a51066da8ca3
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Merge commit 'b14c9649a85152aaf87117fa376bbcd46e754cde'
* commit 'b14c9649a85152aaf87117fa376bbcd46e754cde':
Avoid endless restarts when waiting for connectivity.
|
| |\| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Merge commit '1df61f0e1a275961ad9762ffc1d141adb91870e0' into gingerbread-plus-aosp
* commit '1df61f0e1a275961ad9762ffc1d141adb91870e0':
Avoid endless restarts when waiting for connectivity.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Adding an extra check for usable network connectivity to avoid an endless
restart-pause loop while waiting for usable connectivity.
Change-Id: If4da9ad222993b5479ada658508f445d10a42013
|
|\| | |
| | | |
| | | |
| | | | |
Change-Id: Idcaa37fc828bfae41a150f2cce7b55fa152987be
|
| |\| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
into gingerbread
Merge commit '7bdfb134c6c1c4e3d4c5da61327e62bc38407c95' into gingerbread-plus-aosp
* commit '7bdfb134c6c1c4e3d4c5da61327e62bc38407c95':
Fix and test handling of null/empty download fields.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Minor change to make title/description default to blank stings, and
add test case covering all null/empty download fields.
Change-Id: Id44344bc2e464f46589faed49c8f383a45a8d329
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Merge commit 'fa5175e572258fba0cd55e1c8a01b654178e3f1e'
* commit 'fa5175e572258fba0cd55e1c8a01b654178e3f1e':
Clean up error codes returned by download manager.
|
| |\| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Merge commit 'adb6887d3270d180c94eaf90878d5b67d74a8f28' into gingerbread-plus-aosp
* commit 'adb6887d3270d180c94eaf90878d5b67d74a8f28':
Clean up error codes returned by download manager.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This set of changes cleans up the error codes returned by the download
manager in various failure cases, aiming for improved consistency.
Error codes are part of the public API so it's important to get this
right now.
The main changes here are:
* Refactoring the flow of error status information throughout
DownloadThread to make it more explicit, by having StopRequest
accept a status code in its constructor and eliminating
State.mFinaStatus.
* Eliminating the use of valid HTTP 4xx statuses when those statuses
weren't actually returned by the server. Now, if the returned error
code is a valid HTTP status code, that means it was returned by the
server. These cases have been replaced with more sensible
artificial error codes, including a new ERROR_CANNOT_RESUME when an
interrupted download can't be resumed.
* Improvements to some of the error handling code paths -- ensuring we
don't clear the cache for external downloads, ensuring we don't fail
with CANNOT_RESUME when the download hasn't actually started yet,
removing the restriction on acceptable mime types for public API
downloads.
Change-Id: I0d825845fe0fe7ed5df74bad26e8d34ac0d1cc4e
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
DownloadManager.
Merge commit 'e80c35557bd72489323303af9d93c2c33c88cce9'
* commit 'e80c35557bd72489323303af9d93c2c33c88cce9':
Extend PublicApiAccessTest to exercise DownloadManager.
|
| |\| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Merge commit 'e61798da80558450f580ed948d0d469bd6423d8e' into gingerbread-plus-aosp
* commit 'e61798da80558450f580ed948d0d469bd6423d8e':
Extend PublicApiAccessTest to exercise DownloadManager.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This change adds a new test case to PublicApiAccessTest to enqueue a
request through DownloadManager, ensuring that the values constructed
by DownloadManager fit within the allowed bounds. It also fixes a bug
with allowing http header values exposed by the new test.
Change-Id: I94fec57d7a41298ac42ddaab338516e6a60c4e75
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
into gingerbread
Merge commit '1d332ceb5756ef2e09ae97f1735aa9b529063874'
* commit '1d332ceb5756ef2e09ae97f1735aa9b529063874':
Make all public API downloads visible.
|
| |\| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Merge commit 'da5a4183312f520cf35b154d33cb7205e6ba5557' into gingerbread-plus-aosp
* commit 'da5a4183312f520cf35b154d33cb7205e6ba5557':
Make all public API downloads visible.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This change makes all downloads through the public API visible by
default. It removes the API that had allowed applications to control
notifications while the download runs. This has been replaced with a
hidden API, since such behavior is needed by SystemUpdater and Market
(for self-updates). Additionally, the behavior is now protected by a
new permission.
I'm making this permission signatureOrSystem, and changing the
non-purgeable permission to the same (it should've been that, I just
didn't know). I'm also adding string descriptions to appease the
translation folks.
Change-Id: I192e8b19ff9b0e425257cef0db081c3d75996ea5
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Merge commit '3253c05afccc0cb62c29958d023d863222a5845c'
* commit '3253c05afccc0cb62c29958d023d863222a5845c':
Get wifi limit from secure settings.
|
| |\| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Merge commit '0d4f9f105c3a31475a36e9a1edfa868c66ff455f' into gingerbread-plus-aosp
* commit '0d4f9f105c3a31475a36e9a1edfa868c66ff455f':
Get wifi limit from secure settings.
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I750654c28cb3d9f9aa67bd56e4d8d770dbfde4b4
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Merge commit '92ae639f324084a23a54812ab92304b009a93340'
* commit '92ae639f324084a23a54812ab92304b009a93340':
Add test for many interruptions to a single download.
|
| |\| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Merge commit 'dea0a5f8e5804d3aba40eaa7de763dd88058384e' into gingerbread-plus-aosp
* commit 'dea0a5f8e5804d3aba40eaa7de763dd88058384e':
Add test for many interruptions to a single download.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Adding a new test case for downloads that undergo many interruptions
(as may happen with a very large download that takes many hours).
Includes some refactoring in the test suite.
Early on, this test exposed a race condition in which the download
manager got some I/O exception while reading from the MockWebServer.
I went in and improved/refactored much of the error logging code in
DownloadThread to try and track this down. Unfortunately, once I
finished, the race condition no longer seems to be reproducible, even
with hundreds of runs of the test case. So I've given up on it for
now. In any event, error logging is better and much duplicate code
has been eliminated.
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Merge commit '915912de0373b78de4cd7cc1f45dad760ef94243'
* commit '915912de0373b78de4cd7cc1f45dad760ef94243':
Improved support for 302/307 redirects.
|
| |\| |
| | | |
| | | |
| | | | |
Change-Id: I0adb03f16a6f0cc648886e02c79ffde63e18f99f
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Change the download manager's handling of 302/307 temporary redirects
so that after an interruption of any kind, the delayed retry/resume
will return to the original URI. This complies better with the HTTP
spec. This change also makes the download manager handle other
redirects immediately rather than using the delay that's otherwise
applied to download errors.
I made one more method extraction in DownloadThread to simplify this
change, pulling the top-level logic for a single request into
executeDownload(). It was then just a matter of introducing a new
RetryDownload exeception, similar to StopRequest, and making the
redirection code use it.
Change-Id: Ic719c5725a9fd2e5eebe4dc03453ee71d9f27cd4
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
downloads.
Merge commit '7a8bf08fe936a1fdb0408dea1ec2f39b83acc5d7'
* commit '7a8bf08fe936a1fdb0408dea1ec2f39b83acc5d7':
Fix bug with closing output stream for external downloads.
|
| |\| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Merge commit 'f6b4c24b4a876daa3f4e91d6da418983222b9dfd' into gingerbread-plus-aosp
* commit 'f6b4c24b4a876daa3f4e91d6da418983222b9dfd':
Fix bug with closing output stream for external downloads.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
I added a unit test to cover this, and it caught another issue with
disallowing external destinations outside of the default downloads
directory (which are now allowed with the new API).
Change-Id: I4df6442bebb06458ad28c85f6bc8cbcbf3ce67a1
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Merge commit 'b6ba05828ace9546e5e27d3745e7cbcba323b66d'
* commit 'b6ba05828ace9546e5e27d3745e7cbcba323b66d':
Serialize threading for download manager testing.
|
| |\| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Merge commit 'e6a05a1aa4697440e9630d12b741b3bae321fe49' into gingerbread-plus-aosp
* commit 'e6a05a1aa4697440e9630d12b741b3bae321fe49':
Serialize threading for download manager testing.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The download manager uses threading in a simple way -- it launches two
threads, UpdateThread and DownloadThread, and both are "fire and
forget". This is fortunate for testing, since it means we can
eliminate multithreading and simply run each thread in order, and
everything still works.
This change does just that, abstracting Thread.start() behind
SystemFacade and making FakeSystemFacade put new threads into a queue
and then run through them serially. This simplifies much of the test
code and makes it all much more predictable.
I've simplified the test code as much as possible here and moved a few
more tests over to PublicApiFunctionalTest, leaving only a minimum in
DownloadManagerFunctionalTest, which will eventually be deleted
altogether. I've also improved testing in some areas -- for example,
we can now test that running notifications get cancelled after the
download completes in a robust way.
There is one test case that checks for race conditions and requires
multithreading. I've moved this into a new ThreadingTest class, which
uses a custom FakeSystemFacade that allows multithreading. I've
extracted AbstractPublicApiTest for the newly shared code.
Change-Id: Ic1d5c76bfa9913fe053174c3d8b516790ca8b25f
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Merge commit 'f5373e6ba917cc60db4ee796aed8bc0e37a3f5e9'
* commit 'f5373e6ba917cc60db4ee796aed8bc0e37a3f5e9':
Stub out and test system notifications.
|
| |\| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Merge commit '93155e1da7e89d4925e244f5afa94afb8ada7381' into gingerbread-plus-aosp
* commit '93155e1da7e89d4925e244f5afa94afb8ada7381':
Stub out and test system notifications.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This change abstracts NotificationManager interactions behind
SystemFacade and takes advantage of that to test notifications, to a
limited degree.
It also fixes a silly typo in AbstractDownloadManagerFunctionalTest,
and it introduces an extra sleep between tests to avoid some
flakiness. I'll look for a better solution to that problem after this
change goes in.
Change-Id: I3a0307f828955cd45b0e3581ad499da28cc0556e
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
public API.
Merge commit '0a450da1d9e95f27f479aa45b442960baac49bb1'
* commit '0a450da1d9e95f27f479aa45b442960baac49bb1':
Support for non-purgeable downloads through the public API.
|