| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: Ib8ea24fc58a866f8a5626cdd20e5891eb0a2bbeb
|
|
|
|
|
|
|
| |
Also include more details when reporting HTTP error codes.
Bug: 7966393
Change-Id: I251b1ec7c827693817391b6e9fb8b0cab995395e
|
|
|
|
|
|
|
|
|
|
| |
Move redirection handling into a single loop, and handle each HTTP
response code inline to make flow control easier to reason about.
Fix race condition in tests by waiting for first status update.
Bug: 7887226
Change-Id: Id4bfd182941baad4cd0bb702376c4beeb7275bb2
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
It was cluttering up method signatures, and can easily be reset
before starting each download pass.
Change-Id: I7dee9d2160c3b5f737e7db86baa826d5d0b04b2d
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix bug where resumed downloads wouldn't open in append mode. Handle
end of stream exceptions from URLConnection as special-case for now
to keep tests passing.
Move stream creation outside of DrmOutputStream, and always fsync()
before closing files. Treat HTTP header errors as retryable. Add
explicit state checks to redirection tests.
Change-Id: I19d007284f6bfbffaac93859fe47cd98b79a59c4
|
|
|
|
|
|
|
|
|
|
|
|
| |
This cleans up writing of downloaded data by always writing through
OutputStream interface, which applies DRM if needed. Hands I/O
streams along with method calls to give clearer chain of ownership.
Only retry writes once after verifying free space. Remove
checkCanHandleDownload() check, since most downloads are now using
public API. Release DrmManagerClient sessions when finished.
Change-Id: I49e479089a8218690b556d31ec65a030930ad368
|
|
|
|
|
|
|
|
|
|
| |
Apache HttpClient is in maintenance mode, and doesn't have support
for features like Server Name Indication (SNI). This change moves
DownloadManager to use HttpURLConnection internally. It also
moves redirection handling into HttpURLConnection.
Bug: 7070597
Change-Id: Ie80093eeeecd14f94e1c8b7597ff3f8f5d220691
|
|
|
|
|
|
|
|
|
|
|
| |
Calculate remaining time in DownloadNotifier so we always use the
most recent progress data, which avoids showing stale times.
Weight speed calculation to prefer historical data so remaining time
is smoother on bumpy network connections.
Bug: 7631948
Change-Id: I497be0899e65086356745340b19d3987c6185bdd
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Downloads in the RUNNING state are considered ready to start so that
downloads are correctly resumed when the process crashes. However,
this causes a race condition while UpdateThread is processing a
Cursor when a DownloadThread finishes.
With this change, DownloadThread now skips requests for downloads
already marked as finished. Apps listening for the DOWNLOAD_COMPLETE
broadcast will no longer see data mutated by the second thread, and
will not see the broadcast duplicated.
Bug: 6948938, 6970458, 6818900
Change-Id: I35deac3cedbfe7f50091fab5818d85594dba558c
|
|
|
|
|
| |
Bug: 6544953
Change-Id: I4157c67b9b9cddab4ade795c328a202f6a230f95
|
|
|
|
|
| |
Bug: 6362988
Change-Id: Iab4b86cfcaa6aeed6466f88ff49eb935f96db495
|
|
|
|
|
|
|
|
|
|
|
|
| |
Include flag with each download to indicate if its allowed to proceed
over metered networks. Downloads are left in WAITING_FOR_NETWORK
state, similar to how ALLOWED_NETWORK_TYPES is handled.
Also keep blocked downloads in WAITING_FOR_NETWORK state instead
of marking them as failed.
Bug: 3001465, 5734560
Change-Id: I80bb9aa9bd25ddf6f7a2472db344b6ba6878bd74
|
|
|
|
|
|
|
|
| |
Include platform version, model, and build, when available. Matches
current logic used by Browser.
Bug: 6257336
Change-Id: I0addfd944aff13bd4ce4226bb8d6328da6b0f5d5
|
|
|
|
| |
Change-Id: I21e5f6280748529bad881942f8f5534aa374ba55
|
|
|
|
|
| |
Bug: 4726601
Change-Id: Ibe537bd5c2a092dbf974360cd454751881f7f4ea
|
|
|
|
| |
Change-Id: I78b6b0380a42b28f42334f93e0538ba7f32bc66d
|
|
|
|
| |
Change-Id: Ideeb8cbeaa4b4d82d7c9fc8197a35bf3541a22d7
|
|
|
|
|
|
|
|
| |
Database values can be stale, so delay sanity check until after
updating from file size on disk.
Bug: 5484249
Change-Id: Ia648a575d4a3a391a1f06a866c8282f2d569f15e
|
|
|
|
|
| |
Bug: 5461417
Change-Id: I16f1e8594162b006b80bf7f2cdc6630d0dedfa38
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DownloadThread was only maintaining ETag and the file size for the
duration of one HTTP request, rather than over all the requests needed
to fetch a file, which kind of defeats the point of having them. Fix
this by moving several state variables from InnerState to State, and
initializing the total bytes and current bytes values from the
download database.
Skip actually making the HTTP request if we've already downloaded all
the bytes of the file. This works around bug 5217390 by making the
second DownloadThread do nothing instead of trying to fetch past the
end of the file. (A real fix would eliminate the race condition that
causes the second thread to get created in the first place.)
Bug: 5217390
Change-Id: Ib5b8f87398b4ed2cb3d7f09569e245b55a89da5a
|
|
|
|
|
| |
Bug: 4948913
Change-Id: I831b9149208f0cc007cf3ebede3ef433b2636600
|
|
|
|
|
|
|
|
|
|
|
| |
Now network access is determined by using getActiveNetworkInfoForUid()
which uses BLOCKED to indicate that network should be rejected for
the requesting UID. While download in progress, watch for any policy
changes that should trigger pause.
Also check NetworkInfo.isConnected() for correctness.
Change-Id: I1efa79823f15ecc3fa088a6719da1b770c64b255
|
|\
| |
| |
| | |
files to .fl files during downloading For bug 3188041"
|
| |
| |
| |
| |
| |
| |
| | |
to convert .dm files to .fl files during downloading
For bug 3188041
Change-Id: I882b851664432fba3e57dc25a6be827b48006e69
|
|/
|
|
|
|
|
|
| |
Tag active downloads, and account data usage towards UID that made
the original request. Also release WakeLock only after we've cleaned
up the download.
Change-Id: I72d58c6a51beaeb357e59aae4d7c0f5ac9abaa8d
|
|\
| |
| |
| |
| |
| |
| | |
into honeycomb-mr1
* commit '32d9917cd4f56cabcbafa645c8cd89cd832ac523':
bug:4121206 handle STOPSHIP comments/code
|
| |
| |
| |
| | |
Change-Id: I3c9f8e3b11dd301a0921d89e0333883489f37e55
|
|/
|
|
| |
Change-Id: Ibbce0782fcf7649209d6f56be240209cebd9045b
|
|
|
|
|
|
|
| |
this bug is not so easy to reproduce.
so, this CL will produce some additional logging info for better insight
Change-Id: I0d53c647f1b98a49eb93b937c8e7203723c33dbe
|
|
|
|
|
|
| |
and retry downloads that failed due to the error "sdcard media not mounted"
Change-Id: Id181b8167d331214f72679c85f18cc8b9b969e40
|
|\
| |
| |
| |
| |
| |
| | |
into honeycomb
* commit 'd47f37112d4d0a95cd78e6ec3e14cbbb362b1595':
bug:3396889 (HC branch) fix STOPSHIP code
|
| |
| |
| |
| | |
Change-Id: I1eeb8c5a9936db08bc5997980dc6c7307691034e
|
|/
|
|
|
| |
bug:3062216
Change-Id: I4d510a9fc2095ec86991ae657e90d5f39bc55415
|
|
|
|
| |
Change-Id: Ibaf889d78fc99a32038a77671036fc6a5068580f
|
|
|
|
| |
Change-Id: I95b4c52598092e9f6ffa1713b36ac11d44e26279
|
|
|
|
|
|
|
| |
when download thread gets an exception and aborts a download, print
the stacktrace of the exception - so one can debug the problem.
Change-Id: Iab1bae3b6180d8601e84020453ff35815ae3e69f
|
|
|
|
|
|
|
| |
store its files" into honeycomb"
This reverts commit 7d96bafa59111d9ca735e5ef86dc0598f946b2be, reversing
changes made to 2ce876d2d7000b0c3a1430c5f4932568090f5170.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
data/data/com.android.providers.downlaods/cache is being used
to store the downloaded files, when the user doesn't specify the
destination path.
but system seems to remove files from this dir EVEN when space is
running low. bug:3324673
instead, let DownloadManager use
data/data/com.android.providers.downlaods/files dir
Downlaodmanager manages its space anyway.
Change-Id: I2eb15570395a214477891f50f635fada0b466544
|
|
|
|
|
|
|
|
|
|
| |
make sure the doanloads data dir size is limited by some quote -
100MB default and 200MB for SR.
bug:3286430
tests are in Change-Id: I688f7e058511089bec7fa21e972e23780604d98a
Change-Id: Iba7fab9fa91ea018f35e1c3ef5ec0e6b03cba650
|
|
|
|
|
|
|
|
|
|
| |
bug:3264401
still to do:
make sure only N bytes are taken up by downloads dir
N = a value specific to each device.
default = 100MB.
Change-Id: I2a49f4b3831d3a8d7be13b5fd46d85d56e831e38
|
|
|
|
|
|
| |
need this CL from GB. without it, downloads are badly broken in master.
Change-Id: I82ebc467f877bed50e373c437481ad19e14635bf
|
|\
| |
| |
| |
| |
| |
| | |
GB MR and real fix in HC" into gingerbread
* commit '084c3dc34ed9e6ae9ddc471819de0d6d55021dfd':
(GB MR) bug:3144642 temporary small fix in GB MR and real fix in HC
|
| |\
| | |
| | |
| | |
| | |
| | |
| | | |
real fix in HC" into gingerbread
* commit '26f86843f48b3d7878837a1a9f93865b3eba0aee':
(GB MR) bug:3144642 temporary small fix in GB MR and real fix in HC
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Real fix is in Change-Id: Ifea1544737023008eff44aef9acd976902a0c143
In the database, sometimes _data column in downloads is set to null
and sometimes to empty string. this is inconsistent
and causes bugs such as bug:3144642.
This bug is caused by line# 793 in DownloadThread.
state.mFileName is null sometimes and empty string sometimes - because
the correspodning field is set inconsistentlt in downloads.db
_data column.
in GB MR, apply a bandaid because real fix could be too risky for
GB.
Change-Id: I115b3ba6cfe0262269dbbc4c336b9e1d63c618e4
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
useful for debugging for bugs like bug:3187299
without this error message, one doesn't know WHY downloads
fail.
to prevent PII info in database,
there is a STOPSHIP comment around storage of this error
message in database.
Change-Id: I612e383aef8483b68b772f70dff722a5daea2ef5
|
|/ /
| |
| |
| | |
Change-Id: I2edf1bef5e741de8193cb293807e3ace42003b0c
|
|\|
| |
| |
| |
| |
| |
| |
| |
| | |
into gingerbread
Merge commit 'd4dc8501ecb89b91f865510207297dd960afe031' into gingerbread-plus-aosp
* commit 'd4dc8501ecb89b91f865510207297dd960afe031':
Seriously improve error reporting in DownloadThread.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
My old error reporting strategy for DownloadThread was to log the
stack trace for the exception, so we'd know exactly what conditions
caused the StopRequest. hackbod suggested that we shouldn't log
tracebacks as they clutter the log. Instead, we should just always
include a little string tag explaining why the request is being
stopped -- this is more concise and more useful to developers.
There are three main changes here to acheive this goal:
* make StopRequest require a short, log-friendly error message upon
construction, and add such a message to all construction sites
* make a similar change to GenerateSaveFileError, so that the variety
of errors that originate with Helpers.generateSaveFile() get
similarly fine-grained and concise error reporting
* make network usable checking code return a distinct error code for
each distinct negative condition, and add a utility to return a
log-friendly error message for each such code.
Finally, I cleaned up some of the ways errors/exceptions are handled
in the process.
Change-Id: Ie70cbf3f2960e260e97f8449258e25218d0f900f
|