| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Change-Id: Ie12c6aedd5024af5642dd67208a24ec5452ecf11
Auto-generated-cl: translation import
|
|\
| |
| |
| |
| |
| |
| | |
NOT MERGE. Merge commit \'4602bf9d\' into mergeit
* commit '45f654d03476d9a2493e7fc5f7334bcc0a6c10e3':
Fix large file download failure issue
|
|/|
| |
| |
| |
| |
| |
| | |
\'4602bf9d\' into mergeit
* commit '07dab9c7689ef85ef6a062f57c38bf4c3a8506bd':
Fix large file download failure issue
|
| |\
| | |
| | |
| | |
| | |
| | |
| | | |
into mergeit
* commit '21f5f3516e88e1a237be21e0bd4b07c903310cde':
Fix large file download failure issue
|
| | |\
| | | |
| | | |
| | | |
| | | | |
* commit 'ed009be9799ddfe554745c8aeb8f2ad47a10945b':
Fix large file download failure issue
|
| | |/|
| | | |
| | | |
| | | | |
Change-Id: Ic13c1bd2bad0d833dd50c3bf391b127d90436539
|
| | | |\
| | | | |
| | | | |
| | | | |
| | | | | |
* commit '1c074231df1ddad86cf7db1bed71a249c951ecec':
Fix large file download failure issue
|
| | | | |\
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* commit 'af909b55fe1ffa78e69cfda862fd5ebce712ac7a':
Fix large file download failure issue
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The root cause is int overflow as integer can only hold size
Integer.MAX_VALUE = 0x7FFFFFFF. It is about 2G. So, when a file size
is greater than 2G, it throws a "NumberFormatException", and then
mark this download "unsuccessfully".
The progress bar in notification for the large file downloading was
not correct either. The total file size was converted from long to
int value when in builder.setProgress().
Change-Id: Ib038860e26cf8cade2c423403585c207f8b8979b
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
When multiple downloads are running in parallel, they can end up
claiming the same filename and clobber over each other. This change
introduces locking around filename generation, and touches the
claimed filename so other threads fail the File.exists() check and
keep looking.
Tests to verify.
Bug: 8255596
Change-Id: Ie75ed047c199cf679832c75159056ca036eac18d
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Otherwise we end up triggering MSG_FINAL_UPDATE while still waiting
for socket timeouts. Using 20 seconds for timeout is more sane, and
matches Volley.
Bug: 8233041
Change-Id: Ia7220033a5942c46ca1d79a88e2b3f530cb3edac
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Streams a 3GB file to verify that it downloads correctly, using new
MockWebServer streaming API.
Bug: 8209169
Change-Id: Ic36271bfef3176e1ccea2b40edc7abb1044222f1
|
|\ \ \ \ \ \ |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Otherwise they end up leaking. There is a race around UpdateThread
continuing to process messages before onDestroy() has been invoked,
so explicitly UpdateThread.quit() in both places.
Bug: 8233041
Change-Id: I73f1b70aedace19e23a61a3dddf4986d82f2c7d6
|
|\| | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Since DownloadService starts and stops frequently, recycle a single
UpdateThread across invocations.
Bug: 8233041
Change-Id: I07756fb6bfdbad811cbd58e628fdfdbf63d71bf8
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
|
|/| | | | | | |
|
| |\ \ \ \ \ \ |
|
| | |\ \ \ \ \ \ |
|
| | | |\ \ \ \ \ \ |
|
| | | | |\ \ \ \ \ \ |
|
| | | | | |\ \ \ \ \ \ |
|
| | | | | | |\ \ \ \ \ \ |
|
| | | | | | | |\ \ \ \ \ \ |
|
| | | | | | | | |\ \ \ \ \ \ |
|
| | | | | | | | | |\ \ \ \ \ \ |
|
| | | | | | | | | | |\ \ \ \ \ \ |
|
| | | | | | | | | | | |\ \ \ \ \ \ |
|
| | | | | | | | | | | | |\ \ \ \ \ \ |
|
| | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | |
Also include more details when reporting HTTP error codes.
Bug: 7966393
Change-Id: I251b1ec7c827693817391b6e9fb8b0cab995395e
|
| | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | |
Wait until we've passed a full sample window (500ms) before reporting
an estimated speed. This avoid showing skewed times like "900 hours
remaining."
Also remember to clean up the UpdateThread.
Bug: 8176417
Change-Id: I851e0abcbb443114abe9c22f4650fee7a9bc3aaa
|
|/ / / / / / / / / / / / / / / / / /
| | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | |
When a download fails due to a network change, treat it as waiting
for network, instead of subjecting it to full retry backoff.
Change-Id: Ifdae62fd7c2baad7422f68e09da94740b5f513d0
|
|/ / / / / / / / / / / / / / / / /
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | |
This was moved to to solve a race condition around service shutdown,
but ended up causing another race with remote apps.
Bug: 8200919
Change-Id: Ief470e9454e9be8ec43ca3ec11e3b3440fa5852d
|
|/ / / / / / / / / / / / / / / /
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
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
|
|/ / / / / / / / / / / / / / /
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
Bug: 8145142
Change-Id: I9119796f809aa967f7ec6bb2a3d2b815e86eaf1b
|
|/ / / / / / / / / / / / / /
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
PackageInstaller attempts to grant Uri permissions on my_downloads
paths passed internally. This change lets the system successfully
grant permissions to these paths.
Bug: 7426851
Change-Id: I9a4eea4397c02175aff4e3881a9a79cea1e6e0e3
|
|/ / / / / / / / / / / / /
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
Bug: 8133419
Change-Id: I0c8c0909e41d51cfa2e136304a0a13c5d46afb3b
|
|/ / / / / / / / / / / /
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Change-Id: Ice24d5c62bbcbcfd3d7374eac3a20580f7f31f36
|
|/ / / / / / / / / / /
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
The lifetime of DownloadService can be limited, and it's often
missing from bugreports. The provider has a much longer lifetime,
so have it dump raw data about recent downloads.
Bug: 7350685
Change-Id: I55c9d602d77014ea27820936f1cf5c8ad24f286a
|
|/ / / / / / / / / /
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
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
|
|/ / / / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Switch to using a ThreadPoolExecutor for handling downloads, which
gives us parallelism logic that is easier to reason about. Also
open the door to eventually waiting until the executor is drained
to stopSelf().
Removes DownloadHandler singleton, and gives explicit path for
publishing active download speeds to notifications.
Change-Id: I1836e7742bb8a84861d1ca6bd1e59b2040bd12f8
|
|/ / / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Change-Id: I37a549fc1bf508361eb7f2fbfaebbdf9d173db38
Auto-generated-cl: translation import
|
|/ / / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Now the final errors are always thrown, and the outer code decides
how to handle them as retries. Also clean up method signatures.
Bug: 8022478
Change-Id: I4e7e43be793294ab837370df521e7c381e0bb6c3
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Now DownloadService creates and owns the lifecycle of its own
StorageManager instance.
Change-Id: I8f6bedc02f1dbe610a8e6a25d55383a12716d344
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
It was cluttering up method signatures, and can easily be reset
before starting each download pass.
Change-Id: I7dee9d2160c3b5f737e7db86baa826d5d0b04b2d
|