diff options
author | Steve Howard <showard@google.com> | 2010-07-30 18:55:38 -0700 |
---|---|---|
committer | Steve Howard <showard@google.com> | 2010-08-16 14:29:33 -0700 |
commit | adb6887d3270d180c94eaf90878d5b67d74a8f28 (patch) | |
tree | 8d0af2656dbf21cbb5b25a19d25e2c86f743e33a /tests/public_api_access | |
parent | e61798da80558450f580ed948d0d469bd6423d8e (diff) | |
download | android_packages_providers_DownloadProvider-adb6887d3270d180c94eaf90878d5b67d74a8f28.tar.gz android_packages_providers_DownloadProvider-adb6887d3270d180c94eaf90878d5b67d74a8f28.tar.bz2 android_packages_providers_DownloadProvider-adb6887d3270d180c94eaf90878d5b67d74a8f28.zip |
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
Diffstat (limited to 'tests/public_api_access')
0 files changed, 0 insertions, 0 deletions