| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\ \
| |/
|/|
| |
| | |
* commit '195b46b8a59eb522fc91ac6f498f359a337d3f3e':
Cancel stale notifications when starting.
|
| |
| |
| |
| |
| | |
Bug: 7693834
Change-Id: I5e212be321cccae0f7c76f80049c4e09f0867694
|
|/
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Follow move to EXTRA_NOTIFICATION_CLICK_DOWNLOAD_IDS extras, which
was missing during refactoring.
Bug: 7617373
Change-Id: I26203a2bc6fc0e211a1aa602c0de018332d76f60
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Switch to using new inbox-style notifications when collapsing multiple
downloads. Correctly handles clustering, including cancellation of
stale notifications. All notifications are now handled in a single
class, making it easier to reason about correctness.
Fixed bugs around handling of visibility flags. Move away from using
"int" as internal keys, since they can overflow. Started work for
time estimates, will finish in a future CL.
Explicitly pass all relevant IDs to DownloadReceiver instead of doing
a second racy query. Fix StrictMode warnings when querying in
DownloadReceiver.
Bug: 6777872, 5463678, 6663547, 6967346, 6634261, 5608365
Change-Id: I5eb47b73b90b6250acec2ce5bf8d7a274ed9d3a9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
I don't like DRM, but other people do.
Bug: 7370549
Change-Id: I44220404eab6e6cc85ea16cfcf58474135c03f83
|
|
|
|
|
|
|
|
|
| |
When deleting a download, don't bother scanning it, since we'll just
delete it moments later. This was already racy since it didn't even
wait for the scan to complete.
Bug: 7256243
Change-Id: I8c3b96823d94bc1688ef336cb45746ccd35fc760
|
|
|
|
|
|
|
|
|
| |
When checking network status, treat non-connected networks as
disconnected. This handles cases like captive portal checks, and
slow DHCP servers.
Bug: 7264340
Change-Id: I0b466cee5d5cb73037f3fb209c583711b8f9eefd
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bug: 7164238
Bug: 7237908
Got rid of FLAG_ACTIVITY_NEW_TASK for proper back behavior
Change-Id: I50af9aeafb27d6079bda4f81f4a116b6bb600676
|
|/
|
|
|
| |
Bug: 6923241
Change-Id: Idf4037b4e360cb6453b315d1cc95608762c9e0c8
|
|
|
|
|
|
|
|
|
| |
When building PackageInstaller intents, include ORIGINATING_URI and
REFERRER extras. Unify view intent building for both notifications
and list UI.
Bug: 6900672
Change-Id: I18435e0f8aa549880ec594f82b6a250232706135
|
|\
| |
| |
| |
| | |
* commit 'd7dd6019baf12961dce722d33003e238cdd72f6a':
Adds missing Bluetooth as network type.
|
| |
| |
| |
| |
| |
| |
| |
| | |
The network connection type for Bluetooth is added so
that it is possible to use Bluetooth as Hotspot during
download from the Internet.
Change-Id: Ic32b083068d8316a41f2c31a3575a28163f6c7f3
|
| |
| |
| |
| |
| |
| | |
Directly mock NotificationManager instead of using SystemFacade.
Change-Id: If932d26e23816e8674469c275a828701cce5fc2d
|
|/
|
|
|
| |
Bug: 6544953
Change-Id: I4157c67b9b9cddab4ade795c328a202f6a230f95
|
|\
| |
| |
| |
| | |
* commit 'f918429d0c1927a19d688baa26a07c2c65765580':
Uniform "when" to avoid flashing notifications.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When showing a download, remember the first timestamp when we showed
a notification, and use that time as "when" for all future updates
to avoid flashing.
Also bring back icon animation that had regressed.
Bug: 6596416, 6237256
Change-Id: Ifdc5dc6870dac047515151c1b088e6e379b6a063
|
|\ \
| |/
|/|
| |
| | |
* commit '0acd13fed2f4d0857ce89565fe94674c09b1e844':
avoid repetition of retrying download
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If isReadyToStart returns 'true' for STATUS_INSUFFICIENT_SPACE_ERROR,
DownloadProvider retries downloading after it gets requests from
browser to download contents. The retrying loop won't stop until
its completion (recovering from space error), or user stops
downloading. This retry loop impacts to network traffic, battery
consumption and packet charge. So, change this method to return
'false' for the error in order to stop the loop.
Change-Id: Ia3466db60d86c5900842c7c28d294898ae3ff2bc
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When multiple users are active, this can accidentally delete files
belonging to other users. Checking owner also helps us avoid
deleting recover and lost+found.
Bug: 6362988
Change-Id: Ifc165acc9a9b3ab253a4b6257f370836b98b3a74
|
| | |
| | |
| | |
| | |
| | | |
Bug: 6371718
Change-Id: Id661210101b01daf8f5d46a318c32dbb9de9a4fb
|
| | |
| | |
| | |
| | |
| | | |
Bug: 6362988
Change-Id: Iab4b86cfcaa6aeed6466f88ff49eb935f96db495
|
| | |
| | |
| | |
| | |
| | | |
Bug: 6358473
Change-Id: Ied4a6c8194d0cbb735e43cf7d7759f4674efe535
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When viewing file://-style downloads, open through DownloadsProvider
so that FLAG_GRANT_READ_URI_PERMISSION works. Add support for
OpenableColumns to support external apps probing for metadata.
Bug: 6343461
Change-Id: I630405406321ea1871c62cbcded55a4ee024ef6e
|
| | |
| | |
| | |
| | |
| | | |
Bug: 4997552
Change-Id: I3c612acb5145a7638c9345a376a99958851a0891
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Because the NetworkInfo included in CONNECTIVITY_ACTION broadcast
extra does not reflect the state applicable to the calling UID, and
the last sticky broadcast may have stale state, transition to calling
ConnectivityManager.getActiveNetworkInfo() directly.
Change-Id: Ie7a143e621e5a3a013ec6d8b8613709e7787dc0c
|
| | |
| | |
| | |
| | | |
Change-Id: Ideeb8cbeaa4b4d82d7c9fc8197a35bf3541a22d7
|
|\| |
| | |
| | |
| | |
| | | |
* commit '380044a236ffba16a800cb683fa648860dcfd573':
Allow downloads when no network restriction set.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes bug where DownloadManager would block downloads on WiMAX,
bluetooth, and ethernet networks, even when no network restrictions
had been set.
Bug: 5689335
Change-Id: I6d1bb78cbccb3c5eb1fce40a13b0689be0c3fa13
|
|/
|
|
|
| |
Bug: 5606426
Change-Id: I9b9cee142c360da2a30a4bb8be8dcf40b8c7e43e
|
|\ |
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Database values can be stale, so delay sanity check until after
updating from file size on disk.
Bug: 5484249
Change-Id: Ia648a575d4a3a391a1f06a866c8282f2d569f15e
|