6 years agoam 8b9cad51: Merge "Hide the sorting button when download list is empty"
Jeff Sharkey [Mon, 15 Apr 2013 21:17:35 +0000]
am 8b9cad51: Merge "Hide the sorting button when download list is empty"

* commit '8b9cad519ef72ed4555e9dd32ecee85c922abc32':
  Hide the sorting button when download list is empty

6 years agoMerge "Hide the sorting button when download list is empty"
Jeff Sharkey [Mon, 15 Apr 2013 20:29:33 +0000]
Merge "Hide the sorting button when download list is empty"

6 years agoHide the sorting button when download list is empty
Jaekyun Seok [Mon, 15 Apr 2013 03:35:13 +0000]
Hide the sorting button when download list is empty

Bug: 8515801
Change-Id: Id5ff6d56eb07de6b76bdb6bc3fa75af6ddd59a39

6 years agoam e336af4d: Downloads should always be available.
Jeff Sharkey [Thu, 11 Apr 2013 18:27:20 +0000]
am e336af4d: Downloads should always be available.

* commit 'e336af4d37af25d9261439d4ec0c153aa897dfbe':
  Downloads should always be available.

6 years agoDownloads should always be available.
Jeff Sharkey [Thu, 11 Apr 2013 18:08:10 +0000]
Downloads should always be available.

Bug: 8596021
Change-Id: I56149da0519915764f5c38a8141e1a7dcfff5b25

6 years agoam 62608885: Merge "Restore the appropriate SELinux context to the downloads dir...
Geremy Condra [Fri, 5 Apr 2013 22:42:48 +0000]
am 62608885: Merge "Restore the appropriate SELinux context to the downloads dir." into jb-mr2-dev

* commit '62608885d3d8a7b88776084040f666bd1304b811':
  Restore the appropriate SELinux context to the downloads dir.

6 years agoMerge "Restore the appropriate SELinux context to the downloads dir." into jb-mr2-dev
Geremy Condra [Fri, 5 Apr 2013 22:41:03 +0000]
Merge "Restore the appropriate SELinux context to the downloads dir." into jb-mr2-dev

6 years agoam af49093b: Fix download notification click behaviour.
Danny Baumann [Fri, 5 Apr 2013 20:31:13 +0000]
am af49093b: Fix download notification click behaviour.

* commit 'af49093b1554fdc55977e9281505e05865f33813':
  Fix download notification click behaviour.

6 years agoFix download notification click behaviour.
Danny Baumann [Wed, 3 Apr 2013 12:36:21 +0000]
Fix download notification click behaviour.

PendingIntent.getBroadcast() doesn't update the intent extras if not
explicitly given something to distinguish the intents. This caused the
notification on-click to do nothing on everything but the first
download.

Change-Id: I29544ae5b04f8304cbbe720066a26ff90e422107

6 years agoRestore the appropriate SELinux context to the downloads dir.
Geremy Condra [Thu, 4 Apr 2013 02:07:45 +0000]
Restore the appropriate SELinux context to the downloads dir.

Change-Id: I4839fd07abdd1c6b866f1d94dc36567df047e30c

6 years agoMerge commit 'ab2d11fa' into merge2
Jeff Sharkey [Fri, 5 Apr 2013 20:01:11 +0000]
Merge commit 'ab2d11fa' into merge2

Change-Id: I92cd6985b8074a238118b95599e4df57e6849f62

6 years agoMerge "Fix download notification click behaviour."
Jeff Sharkey [Fri, 5 Apr 2013 18:12:01 +0000]
Merge "Fix download notification click behaviour."

6 years agoFix download notification click behaviour.
Danny Baumann [Wed, 3 Apr 2013 12:36:21 +0000]
Fix download notification click behaviour.

PendingIntent.getBroadcast() doesn't update the intent extras if not
explicitly given something to distinguish the intents. This caused the
notification on-click to do nothing on everything but the first
download.

Change-Id: I29544ae5b04f8304cbbe720066a26ff90e422107

6 years agoNew PendingIntents when extras change.
Jeff Sharkey [Tue, 26 Mar 2013 20:15:43 +0000]
New PendingIntents when extras change.

Otherwise notifications end up launching with stale download IDs.

Bug: 8417220
Change-Id: Ie72a2f4ac7b72213678ac6001af45709034492dd

6 years agoUnregister observer when tearing down service.
Jeff Sharkey [Tue, 26 Mar 2013 18:18:16 +0000]
Unregister observer when tearing down service.

Also reduce and adjust some logging.

Bug: 8470658
Change-Id: Ia1f1cbd315ded04edd2113506e5c5a1db5ec85b4

6 years agoRevert "Avoid sending messages after HandlerThread.quit()."
Fabrice Di Meglio [Tue, 26 Mar 2013 03:12:57 +0000]
Revert "Avoid sending messages after HandlerThread.quit()."

This reverts commit 97d507d95f9885ceb12f2ce2483361b5ed265f9f

Change-Id: I20374301561b3a1c79c2d986292af50049de2aac

6 years agoAvoid sending messages after HandlerThread.quit().
Jeff Sharkey [Tue, 26 Mar 2013 00:45:19 +0000]
Avoid sending messages after HandlerThread.quit().

Bug: 8470658
Change-Id: I4cfd6a01c2c2d845a72d3f58c29eec8b44176537

6 years agoReduce logging, dump stacks before wtf().
Jeff Sharkey [Mon, 25 Mar 2013 20:54:29 +0000]
Reduce logging, dump stacks before wtf().

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

6 years agoam a6836350: am 9f48387a: Merge "Add title attribute for menu item."
Jeff Sharkey [Mon, 25 Mar 2013 18:32:16 +0000]
am a6836350: am 9f48387a: Merge "Add title attribute for menu item."

* commit 'a683635084b05b9b03752c6dfedfb749d29080f4':
  Add title attribute for menu item.

6 years agoam 9f48387a: Merge "Add title attribute for menu item."
Jeff Sharkey [Mon, 25 Mar 2013 18:31:03 +0000]
am 9f48387a: Merge "Add title attribute for menu item."

* commit '9f48387a1cf8116b8aba3035fbb1f0aec4cf0861':
  Add title attribute for menu item.

6 years agoStart using MockStreamResponse.
Jeff Sharkey [Thu, 21 Mar 2013 21:24:25 +0000]
Start using MockStreamResponse.

Change-Id: Ida4a0a85883ccd6763b07e958ddc6ecf7eedf790

6 years agoMerge "Add title attribute for menu item."
Jeff Sharkey [Mon, 25 Mar 2013 17:32:53 +0000]
Merge "Add title attribute for menu item."

6 years agoFinish RTL work in Downloads.
Jeff Sharkey [Thu, 21 Mar 2013 21:57:07 +0000]
Finish RTL work in Downloads.

Clean up some padding, and handle checkbox clicks based on RTL mode.

Bug: 8133419
Change-Id: I9c0f54218eb1c182fbe6f3f4eeb3e83e7ebc6ea9

6 years agoMerge "Increase timeout for domains with many DNS entries." into jb-mr2-dev
Jeff Sharkey [Thu, 21 Mar 2013 00:07:11 +0000]
Merge "Increase timeout for domains with many DNS entries." into jb-mr2-dev

6 years agoIncrease timeout for domains with many DNS entries.
Jeff Sharkey [Thu, 21 Mar 2013 00:03:48 +0000]
Increase timeout for domains with many DNS entries.

Bug: 8233041
Change-Id: Ifb70273474c391ef687ba018d9ef809a359c7149

6 years agoAdd title attribute for menu item.
fliang [Wed, 27 Feb 2013 10:04:42 +0000]
Add title attribute for menu item.

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

6 years agoAdd title attribute for menu item.
fliang [Wed, 27 Feb 2013 10:04:42 +0000]
Add title attribute for menu item.

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

6 years agoDefeat transparent Accept-Encoding: gzip.
Jeff Sharkey [Tue, 19 Mar 2013 01:30:02 +0000]
Defeat transparent Accept-Encoding: gzip.

Transparent gzip encoding doesn't allow us to easily resume partial
requests, so defeat it for now.

Bug: 8409417
Change-Id: I1172709c09d1153fff1ba8df072a9bef896e244d

6 years agoam 07dab9c7: am 21f5f351: am ed009be9: (-s ours) DO NOT MERGE. Merge commit \'4602bf9...
Jeff Sharkey [Fri, 8 Mar 2013 19:09:46 +0000]
am 07dab9c7: am 21f5f351: am ed009be9: (-s ours) DO NOT MERGE. Merge commit \'4602bf9d\' into mergeit

* commit '07dab9c7689ef85ef6a062f57c38bf4c3a8506bd':
  Fix large file download failure issue

6 years agoam 21f5f351: am ed009be9: (-s ours) DO NOT MERGE. Merge commit \'4602bf9d\' into...
Jeff Sharkey [Fri, 8 Mar 2013 19:06:43 +0000]
am 21f5f351: am ed009be9: (-s ours) DO NOT MERGE. Merge commit \'4602bf9d\' into mergeit

* commit '21f5f3516e88e1a237be21e0bd4b07c903310cde':
  Fix large file download failure issue

6 years agoam ed009be9: (-s ours) DO NOT MERGE. Merge commit \'4602bf9d\' into mergeit
Jeff Sharkey [Fri, 8 Mar 2013 19:04:20 +0000]
am ed009be9: (-s ours) DO NOT MERGE. Merge commit \'4602bf9d\' into mergeit

* commit 'ed009be9799ddfe554745c8aeb8f2ad47a10945b':
  Fix large file download failure issue

6 years agoDO NOT MERGE. Merge commit '4602bf9d' into mergeit
Jeff Sharkey [Fri, 8 Mar 2013 18:57:15 +0000]
DO NOT MERGE. Merge commit '4602bf9d' into mergeit

Change-Id: Ic13c1bd2bad0d833dd50c3bf391b127d90436539

6 years agoam 1c074231: am af909b55: Fix large file download failure issue
Catherine Liu [Fri, 8 Mar 2013 18:19:49 +0000]
am 1c074231: am af909b55: Fix large file download failure issue

* commit '1c074231df1ddad86cf7db1bed71a249c951ecec':
  Fix large file download failure issue

6 years agoam af909b55: Fix large file download failure issue
Catherine Liu [Fri, 8 Mar 2013 18:18:26 +0000]
am af909b55: Fix large file download failure issue

* commit 'af909b55fe1ffa78e69cfda862fd5ebce712ac7a':
  Fix large file download failure issue

6 years agoFix large file download failure issue
Catherine Liu [Tue, 5 Feb 2013 22:00:50 +0000]
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

6 years agoFix race conditions around filename claiming.
Jeff Sharkey [Fri, 1 Mar 2013 19:18:38 +0000]
Fix race conditions around filename claiming.

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

6 years agoAdjust timeouts to reduce false-positive bugs.
Jeff Sharkey [Tue, 26 Feb 2013 20:43:56 +0000]
Adjust timeouts to reduce false-positive bugs.

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

6 years agoTest to verify extremely large downloads.
Jeff Sharkey [Fri, 22 Feb 2013 19:57:48 +0000]
Test to verify extremely large downloads.

Streams a 3GB file to verify that it downloads correctly, using new
MockWebServer streaming API.

Bug: 8209169
Change-Id: Ic36271bfef3176e1ccea2b40edc7abb1044222f1

6 years agoMerge "Ack, we actually need to UpdateThread.quit()."
Jeff Sharkey [Thu, 21 Feb 2013 00:11:58 +0000]
Merge "Ack, we actually need to UpdateThread.quit()."

6 years agoAck, we actually need to UpdateThread.quit().
Jeff Sharkey [Thu, 21 Feb 2013 00:10:39 +0000]
Ack, we actually need to UpdateThread.quit().

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

6 years agoMerge "Only use single UpdateThread."
Jeff Sharkey [Wed, 20 Feb 2013 23:58:25 +0000]
Merge "Only use single UpdateThread."

6 years agoOnly use single UpdateThread.
Jeff Sharkey [Wed, 20 Feb 2013 23:54:26 +0000]
Only use single UpdateThread.

Since DownloadService starts and stops frequently, recycle a single
UpdateThread across invocations.

Bug: 8233041
Change-Id: I07756fb6bfdbad811cbd58e628fdfdbf63d71bf8

6 years agoMerge remote-tracking branch 'goog/jb-mr2-release'
Ed Heyl [Wed, 20 Feb 2013 21:47:33 +0000]
Merge remote-tracking branch 'goog/jb-mr2-release'

6 years agomerge in jb-mr2-release history after reset to master
The Android Automerger [Wed, 20 Feb 2013 13:56:21 +0000]
merge in jb-mr2-release history after reset to master

6 years agoOnly report speeds from full samples windows.
Jeff Sharkey [Wed, 20 Feb 2013 01:11:41 +0000]
Only report speeds from full samples windows.

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

6 years agoRetries shouldn't backoff when network changes.
Jeff Sharkey [Tue, 19 Feb 2013 20:48:08 +0000]
Retries shouldn't backoff when network changes.

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

6 years agomerge in jb-mr2-release history after reset to master
The Android Automerger [Tue, 19 Feb 2013 17:52:06 +0000]
merge in jb-mr2-release history after reset to master

6 years agoUpdate database before sending broadcast.
Jeff Sharkey [Thu, 14 Feb 2013 18:07:16 +0000]
Update database before sending broadcast.

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

6 years agomerge in jb-mr2-release history after reset to master
The Android Automerger [Wed, 13 Feb 2013 13:56:34 +0000]
merge in jb-mr2-release history after reset to master

6 years agoRedesign of DownloadManager update loop.
Jeff Sharkey [Tue, 12 Feb 2013 00:19:39 +0000]
Redesign of DownloadManager update loop.

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

6 years agomerge in jb-mr2-release history after reset to master
The Android Automerger [Mon, 11 Feb 2013 15:12:24 +0000]
merge in jb-mr2-release history after reset to master

6 years agoActive notifications only for running downloads.
Jeff Sharkey [Fri, 8 Feb 2013 00:13:20 +0000]
Active notifications only for running downloads.

Bug: 8145142
Change-Id: I9119796f809aa967f7ec6bb2a3d2b815e86eaf1b

6 years agomerge in jb-mr2-release history after reset to master
The Android Automerger [Thu, 7 Feb 2013 15:11:22 +0000]
merge in jb-mr2-release history after reset to master

6 years agoAllow granting access to "my_downloads" paths.
Jeff Sharkey [Sat, 27 Oct 2012 00:28:34 +0000]
Allow granting access to "my_downloads" paths.

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

6 years agomerge in jb-mr2-release history after reset to master
The Android Automerger [Wed, 6 Feb 2013 15:11:35 +0000]
merge in jb-mr2-release history after reset to master

6 years agoUpdate Downloads UI for RTL languages.
Jeff Sharkey [Tue, 5 Feb 2013 18:52:51 +0000]
Update Downloads UI for RTL languages.

Bug: 8133419
Change-Id: I0c8c0909e41d51cfa2e136304a0a13c5d46afb3b

6 years agomerge in jb-mr2-release history after reset to master
The Android Automerger [Fri, 1 Feb 2013 15:10:53 +0000]
merge in jb-mr2-release history after reset to master

6 years agoMigrate to using Mockito directly.
Jeff Sharkey [Fri, 1 Feb 2013 01:10:54 +0000]
Migrate to using Mockito directly.

Change-Id: Ice24d5c62bbcbcfd3d7374eac3a20580f7f31f36

6 years agomerge in jb-mr2-release history after reset to master
The Android Automerger [Thu, 31 Jan 2013 15:11:02 +0000]
merge in jb-mr2-release history after reset to master

6 years agoDump recent downloads from provider.
Jeff Sharkey [Wed, 30 Jan 2013 19:26:46 +0000]
Dump recent downloads from provider.

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

6 years agomerge in jb-mr2-release history after reset to master
The Android Automerger [Wed, 30 Jan 2013 15:11:03 +0000]
merge in jb-mr2-release history after reset to master

6 years agoTests for max retries/redirects, ETag switches.
Jeff Sharkey [Tue, 29 Jan 2013 22:48:46 +0000]
Tests for max retries/redirects, ETag switches.

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

6 years agomerge in jb-mr2-release history after reset to master
The Android Automerger [Tue, 29 Jan 2013 15:11:08 +0000]
merge in jb-mr2-release history after reset to master

6 years agoCleaner thread management, less global state.
Jeff Sharkey [Sat, 12 Jan 2013 23:58:51 +0000]
Cleaner thread management, less global state.

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

6 years agomerge in jb-mr2-release history after reset to master
The Android Automerger [Wed, 23 Jan 2013 15:10:58 +0000]
merge in jb-mr2-release history after reset to master

6 years agoImport translations. DO NOT MERGE
Baligh Uddin [Tue, 22 Jan 2013 18:09:22 +0000]
Import translations. DO NOT MERGE

Change-Id: I37a549fc1bf508361eb7f2fbfaebbdf9d173db38
Auto-generated-cl: translation import

6 years agomerge in jb-mr2-release history after reset to master
The Android Automerger [Fri, 18 Jan 2013 15:11:02 +0000]
merge in jb-mr2-release history after reset to master

6 years agoBetter handling of retryable errors.
Jeff Sharkey [Fri, 18 Jan 2013 01:26:51 +0000]
Better handling of retryable errors.

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

6 years agomerge in master-release history after reset to master
The Android Automerger [Mon, 14 Jan 2013 15:50:16 +0000]
merge in master-release history after reset to master

6 years agoMove network state to enums for type safety.
Jeff Sharkey [Sat, 12 Jan 2013 23:01:04 +0000]
Move network state to enums for type safety.

Change-Id: Ib8ea24fc58a866f8a5626cdd20e5891eb0a2bbeb

6 years agoOnly add one User-Agent header.
Jeff Sharkey [Thu, 10 Jan 2013 19:12:52 +0000]
Only add one User-Agent header.

Also include more details when reporting HTTP error codes.

Bug: 7966393
Change-Id: I251b1ec7c827693817391b6e9fb8b0cab995395e

6 years agoOnly add one User-Agent header.
Jeff Sharkey [Thu, 10 Jan 2013 19:12:52 +0000]
Only add one User-Agent header.

Also include more details when reporting HTTP error codes.

Bug: 7966393
Change-Id: I251b1ec7c827693817391b6e9fb8b0cab995395e

6 years agoSimplify download flow control, handle redirects.
Jeff Sharkey [Mon, 24 Dec 2012 03:28:09 +0000]
Simplify download flow control, handle redirects.

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

6 years agoClean up DownloadManager threading tests.
Jeff Sharkey [Fri, 4 Jan 2013 06:59:50 +0000]
Clean up DownloadManager threading tests.

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

6 years agoRemove singleton StorageManager.
Jeff Sharkey [Sat, 5 Jan 2013 17:47:36 +0000]
Remove singleton StorageManager.

Now DownloadService creates and owns the lifecycle of its own
StorageManager instance.

Change-Id: I8f6bedc02f1dbe610a8e6a25d55383a12716d344

6 years agoFold InnerState into State.
Jeff Sharkey [Thu, 20 Dec 2012 23:10:34 +0000]
Fold InnerState into State.

It was cluttering up method signatures, and can easily be reset
before starting each download pass.

Change-Id: I7dee9d2160c3b5f737e7db86baa826d5d0b04b2d

6 years agoAlways append to files, handle end of stream.
Jeff Sharkey [Tue, 18 Dec 2012 01:05:03 +0000]
Always append to files, handle end of stream.

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

6 years agoMerge "Cleaner I/O."
Jeff Sharkey [Thu, 13 Dec 2012 23:43:09 +0000]
Merge "Cleaner I/O."

6 years agoCleaner I/O.
Jeff Sharkey [Thu, 6 Dec 2012 23:54:44 +0000]
Cleaner I/O.

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

6 years agoam 195b46b8: am b0bb182a: Cancel stale notifications when starting.
Jeff Sharkey [Thu, 13 Dec 2012 22:23:09 +0000]
am 195b46b8: am b0bb182a: Cancel stale notifications when starting.

* commit '195b46b8a59eb522fc91ac6f498f359a337d3f3e':
  Cancel stale notifications when starting.

6 years agoam b0bb182a: Cancel stale notifications when starting.
Jeff Sharkey [Thu, 13 Dec 2012 22:19:47 +0000]
am b0bb182a: Cancel stale notifications when starting.

* commit 'b0bb182a1b52b31ccf1ec5e0be82308ebb4857e2':
  Cancel stale notifications when starting.

6 years agoCancel stale notifications when starting.
Jeff Sharkey [Thu, 13 Dec 2012 20:58:18 +0000]
Cancel stale notifications when starting.

Bug: 7693834
Change-Id: I5e212be321cccae0f7c76f80049c4e09f0867694

6 years agoam 770f0d7c: (-s ours) am 1d71eb6b: Import translations. DO NOT MERGE
Baligh Uddin [Wed, 12 Dec 2012 18:34:05 +0000]
am 770f0d7c: (-s ours) am 1d71eb6b: Import translations. DO NOT MERGE

* commit '770f0d7ce322ffb332ae325d7377afc4dcae4f7a':
  Import translations. DO NOT MERGE

6 years agoam 25ecefe9: (-s ours) Import translations. DO NOT MERGE
Baligh Uddin [Wed, 12 Dec 2012 18:34:03 +0000]
am 25ecefe9: (-s ours) Import translations. DO NOT MERGE

* commit '25ecefe9d117834011070e3575e7ab099bec6cc8':
  Import translations. DO NOT MERGE

6 years agoam 1d71eb6b: Import translations. DO NOT MERGE
Baligh Uddin [Wed, 12 Dec 2012 18:28:54 +0000]
am 1d71eb6b: Import translations. DO NOT MERGE

* commit '1d71eb6b347cf861c53c1bc4c18b8928528b244c':
  Import translations. DO NOT MERGE

6 years agoMerge "Import translations. DO NOT MERGE"
Baligh Uddin [Wed, 12 Dec 2012 18:27:26 +0000]
Merge "Import translations. DO NOT MERGE"

6 years agoMerge "Move DownloadManager to HttpURLConnection."
Jeff Sharkey [Wed, 12 Dec 2012 17:54:36 +0000]
Merge "Move DownloadManager to HttpURLConnection."

6 years agoImport translations. DO NOT MERGE
Baligh Uddin [Wed, 12 Dec 2012 17:48:50 +0000]
Import translations. DO NOT MERGE

Change-Id: If63f10fb04fea622a810a473b7a6026e09243b62
Auto-generated-cl: translation import

6 years agoImport translations. DO NOT MERGE
Baligh Uddin [Wed, 12 Dec 2012 17:48:12 +0000]
Import translations. DO NOT MERGE

Change-Id: Icadeb210d13e600f85b1a1d21aaaa79e26d78240
Auto-generated-cl: translation import

6 years agoImport translations. DO NOT MERGE
Baligh Uddin [Wed, 12 Dec 2012 17:47:52 +0000]
Import translations. DO NOT MERGE

Change-Id: If4d0d58f02f114be7500b092bc64bf98133a4c8f
Auto-generated-cl: translation import

6 years agoMove DownloadManager to HttpURLConnection.
Jeff Sharkey [Thu, 6 Dec 2012 19:54:45 +0000]
Move DownloadManager to HttpURLConnection.

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

6 years agoam e12b912f: (-s ours) am 99de1b60: Import translations. DO NOT MERGE
Baligh Uddin [Fri, 7 Dec 2012 07:23:21 +0000]
am e12b912f: (-s ours) am 99de1b60: Import translations. DO NOT MERGE

* commit 'e12b912f9cbf5d55043dc9d6fdfc9398463d046b':
  Import translations. DO NOT MERGE

6 years agoam 05a3d61b: (-s ours) Import translations. DO NOT MERGE
Baligh Uddin [Fri, 7 Dec 2012 07:23:20 +0000]
am 05a3d61b: (-s ours) Import translations. DO NOT MERGE

* commit '05a3d61b7481a46083877c1832f43bda07a450bb':
  Import translations. DO NOT MERGE

6 years agoam 9ad850e7: (-s ours) am 5f956afb: Import translations. DO NOT MERGE
Baligh Uddin [Fri, 7 Dec 2012 07:23:19 +0000]
am 9ad850e7: (-s ours) am 5f956afb: Import translations. DO NOT MERGE

* commit '9ad850e79f5aa38ef4069b4a7743c5aeb934ae29':
  Import translations. DO NOT MERGE

6 years agoam 9529ca65: (-s ours) Import translations. DO NOT MERGE
Baligh Uddin [Fri, 7 Dec 2012 07:23:19 +0000]
am 9529ca65: (-s ours) Import translations. DO NOT MERGE

* commit '9529ca65cf71b11a20f7586c2a6e3ce80963d676':
  Import translations. DO NOT MERGE

6 years agoam 99de1b60: Import translations. DO NOT MERGE
Baligh Uddin [Thu, 6 Dec 2012 16:25:20 +0000]
am 99de1b60: Import translations. DO NOT MERGE

* commit '99de1b606e5462ab191d2af5b9bd8c7c4ed30d00':
  Import translations. DO NOT MERGE

6 years agoImport translations. DO NOT MERGE
Baligh Uddin [Thu, 6 Dec 2012 16:20:42 +0000]
Import translations. DO NOT MERGE

Change-Id: I97f4b6ad261e150770d996f03972f61084493ea9
Auto-generated-cl: translation import

6 years agoImport translations. DO NOT MERGE
Baligh Uddin [Thu, 6 Dec 2012 16:20:19 +0000]
Import translations. DO NOT MERGE

Change-Id: I6882b2a17c13803e66b1afc8e0bc02dd3d4bf049
Auto-generated-cl: translation import

6 years agoImport translations. DO NOT MERGE
Baligh Uddin [Thu, 6 Dec 2012 16:20:03 +0000]
Import translations. DO NOT MERGE

Change-Id: Ibc78b0a1952d9482c86b603b5b7d4cc528e4f54b
Auto-generated-cl: translation import

6 years agoam 5f956afb: Import translations. DO NOT MERGE
Baligh Uddin [Wed, 5 Dec 2012 21:27:45 +0000]
am 5f956afb: Import translations. DO NOT MERGE

* commit '5f956afb7c75a2184bbada95eb4d91c35d1736ae':
  Import translations. DO NOT MERGE