summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Avoid sending messages after HandlerThread.quit().Jeff Sharkey2013-03-251-6/+12
| | | | | Bug: 8470658 Change-Id: I4cfd6a01c2c2d845a72d3f58c29eec8b44176537
* Reduce logging, dump stacks before wtf().Jeff Sharkey2013-03-253-6/+44
| | | | | | | | | Most wtf() are looking like network timeouts, not threading bugs, so disable verbose debugging and add more targeted thread logging before calling wtf(). Bug: 8233041 Change-Id: I8e276bffd7880cfe13b65e7e81f5507cab627692
* am a6836350: am 9f48387a: Merge "Add title attribute for menu item."Jeff Sharkey2013-03-250-0/+0
|\ | | | | | | | | * commit 'a683635084b05b9b03752c6dfedfb749d29080f4': Add title attribute for menu item.
| * am 9f48387a: Merge "Add title attribute for menu item."Jeff Sharkey2013-03-251-0/+2
| |\ | | | | | | | | | | | | * commit '9f48387a1cf8116b8aba3035fbb1f0aec4cf0861': Add title attribute for menu item.
| | * Merge "Add title attribute for menu item."Jeff Sharkey2013-03-251-0/+2
| | |\
| | | * Add title attribute for menu item.fliang2013-03-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix is needed to display text instead of a blank rectangle when user selects the share or delete icons. Bug: 8418296 Change-Id: Ie21af8600cb19bc652d3677c53bdc05278998612
* | | | Start using MockStreamResponse.Jeff Sharkey2013-03-252-1/+7
| | | | | | | | | | | | | | | | Change-Id: Ida4a0a85883ccd6763b07e958ddc6ecf7eedf790
* | | | Finish RTL work in Downloads.Jeff Sharkey2013-03-216-19/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up some padding, and handle checkbox clicks based on RTL mode. Bug: 8133419 Change-Id: I9c0f54218eb1c182fbe6f3f4eeb3e83e7ebc6ea9
* | | | Merge "Increase timeout for domains with many DNS entries." into jb-mr2-devJeff Sharkey2013-03-211-2/+2
|\ \ \ \
| * | | | Increase timeout for domains with many DNS entries.Jeff Sharkey2013-03-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Bug: 8233041 Change-Id: Ifb70273474c391ef687ba018d9ef809a359c7149
* | | | | Add title attribute for menu item.fliang2013-03-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix is needed to display text instead of a blank rectangle when user selects the share or delete icons. Bug: 8418296 Change-Id: Ie21af8600cb19bc652d3677c53bdc05278998612
* | | | | Defeat transparent Accept-Encoding: gzip.Jeff Sharkey2013-03-181-0/+4
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Transparent gzip encoding doesn't allow us to easily resume partial requests, so defeat it for now. Bug: 8409417 Change-Id: I1172709c09d1153fff1ba8df072a9bef896e244d
* | | | am 07dab9c7: am 21f5f351: am ed009be9: (-s ours) DO NOT MERGE. Merge commit ↵Jeff Sharkey2013-03-080-0/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | \'4602bf9d\' into mergeit * commit '07dab9c7689ef85ef6a062f57c38bf4c3a8506bd': Fix large file download failure issue
| * | | am 21f5f351: am ed009be9: (-s ours) DO NOT MERGE. Merge commit \'4602bf9d\' ↵Jeff Sharkey2013-03-080-0/+0
| |\ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | into mergeit * commit '21f5f3516e88e1a237be21e0bd4b07c903310cde': Fix large file download failure issue
| | * | am ed009be9: (-s ours) DO NOT MERGE. Merge commit \'4602bf9d\' into mergeitJeff Sharkey2013-03-080-0/+0
| | |\ \ | | | | | | | | | | | | | | | | | | | | * commit 'ed009be9799ddfe554745c8aeb8f2ad47a10945b': Fix large file download failure issue
| | | * | DO NOT MERGE. Merge commit '4602bf9d' into mergeitJeff Sharkey2013-03-081-1/+1
| | |/| | | | | | | | | | | | | | | | | Change-Id: Ic13c1bd2bad0d833dd50c3bf391b127d90436539
| | | * | am 1c074231: am af909b55: Fix large file download failure issueCatherine Liu2013-03-082-3/+8
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | * commit '1c074231df1ddad86cf7db1bed71a249c951ecec': Fix large file download failure issue
| | | | * \ am af909b55: Fix large file download failure issueCatherine Liu2013-03-082-3/+8
| | | | |\ \ | | | | | |/ | | | | |/| | | | | | | | | | | | | * commit 'af909b55fe1ffa78e69cfda862fd5ebce712ac7a': Fix large file download failure issue
| | | | | * Fix large file download failure issueCatherine Liu2013-03-082-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | Fix race conditions around filename claiming.Jeff Sharkey2013-03-012-10/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | Adjust timeouts to reduce false-positive bugs.Jeff Sharkey2013-02-262-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | Test to verify extremely large downloads.Jeff Sharkey2013-02-253-3/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Streams a 3GB file to verify that it downloads correctly, using new MockWebServer streaming API. Bug: 8209169 Change-Id: Ic36271bfef3176e1ccea2b40edc7abb1044222f1
* | | | | | Merge "Ack, we actually need to UpdateThread.quit()."Jeff Sharkey2013-02-211-8/+6
|\ \ \ \ \ \
| * | | | | | Ack, we actually need to UpdateThread.quit().Jeff Sharkey2013-02-201-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | Merge "Only use single UpdateThread."Jeff Sharkey2013-02-201-4/+5
|\| | | | | |
| * | | | | | Only use single UpdateThread.Jeff Sharkey2013-02-201-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since DownloadService starts and stops frequently, recycle a single UpdateThread across invocations. Bug: 8233041 Change-Id: I07756fb6bfdbad811cbd58e628fdfdbf63d71bf8
* | | | | | | Merge remote-tracking branch 'goog/jb-mr2-release'Ed Heyl2013-02-200-0/+0
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | |
| * | | | | | merge in jb-mr2-release history after reset to masterThe Android Automerger2013-02-200-0/+0
|/| | | | | |
| * | | | | | merge in jb-mr2-release history after reset to masterThe Android Automerger2013-02-190-0/+0
| |\ \ \ \ \ \
| | * \ \ \ \ \ merge in jb-mr2-release history after reset to masterThe Android Automerger2013-02-130-0/+0
| | |\ \ \ \ \ \
| | | * \ \ \ \ \ merge in jb-mr2-release history after reset to masterThe Android Automerger2013-02-110-0/+0
| | | |\ \ \ \ \ \
| | | | * \ \ \ \ \ merge in jb-mr2-release history after reset to masterThe Android Automerger2013-02-070-0/+0
| | | | |\ \ \ \ \ \
| | | | | * \ \ \ \ \ merge in jb-mr2-release history after reset to masterThe Android Automerger2013-02-060-0/+0
| | | | | |\ \ \ \ \ \
| | | | | | * \ \ \ \ \ merge in jb-mr2-release history after reset to masterThe Android Automerger2013-02-010-0/+0
| | | | | | |\ \ \ \ \ \
| | | | | | | * \ \ \ \ \ merge in jb-mr2-release history after reset to masterThe Android Automerger2013-01-310-0/+0
| | | | | | | |\ \ \ \ \ \
| | | | | | | | * \ \ \ \ \ merge in jb-mr2-release history after reset to masterThe Android Automerger2013-01-300-0/+0
| | | | | | | | |\ \ \ \ \ \
| | | | | | | | | * \ \ \ \ \ merge in jb-mr2-release history after reset to masterThe Android Automerger2013-01-290-0/+0
| | | | | | | | | |\ \ \ \ \ \
| | | | | | | | | | * \ \ \ \ \ merge in jb-mr2-release history after reset to masterThe Android Automerger2013-01-230-0/+0
| | | | | | | | | | |\ \ \ \ \ \
| | | | | | | | | | | * \ \ \ \ \ merge in jb-mr2-release history after reset to masterThe Android Automerger2013-01-180-0/+0
| | | | | | | | | | | |\ \ \ \ \ \
| | | | | | | | | | | | * \ \ \ \ \ merge in master-release history after reset to masterThe Android Automerger2013-01-140-0/+0
| | | | | | | | | | | | |\ \ \ \ \ \
| | | | | | | | | | | | | * | | | | | Only add one User-Agent header.Jeff Sharkey2013-01-102-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also include more details when reporting HTTP error codes. Bug: 7966393 Change-Id: I251b1ec7c827693817391b6e9fb8b0cab995395e
* | | | | | | | | | | | | | | | | | | Only report speeds from full samples windows.Jeff Sharkey2013-02-192-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | | | | | | | | | | | | | Retries shouldn't backoff when network changes.Jeff Sharkey2013-02-193-26/+22
|/ / / / / / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* / / / / / / / / / / / / / / / / / Update database before sending broadcast.Jeff Sharkey2013-02-141-1/+1
|/ / / / / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* / / / / / / / / / / / / / / / / Redesign of DownloadManager update loop.Jeff Sharkey2013-02-127-372/+459
|/ / / / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* / / / / / / / / / / / / / / / Active notifications only for running downloads.Jeff Sharkey2013-02-071-1/+2
|/ / / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 8145142 Change-Id: I9119796f809aa967f7ec6bb2a3d2b815e86eaf1b
* / / / / / / / / / / / / / / Allow granting access to "my_downloads" paths.Jeff Sharkey2013-02-061-0/+3
|/ / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* / / / / / / / / / / / / / Update Downloads UI for RTL languages.Jeff Sharkey2013-02-052-9/+15
|/ / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 8133419 Change-Id: I0c8c0909e41d51cfa2e136304a0a13c5d46afb3b
* / / / / / / / / / / / / Migrate to using Mockito directly.Jeff Sharkey2013-01-313-9/+9
|/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ice24d5c62bbcbcfd3d7374eac3a20580f7f31f36
* / / / / / / / / / / / Dump recent downloads from provider.Jeff Sharkey2013-01-301-1/+41
|/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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