summaryrefslogtreecommitdiffstats
path: root/core/java/android/provider/Downloads.java
Commit message (Collapse)AuthorAgeFilesLines
* DO NOT MERGE. Retain DownloadManager Uri grants when clearing.Jeff Sharkey2017-03-131-0/+2
| | | | | | | | | | | | | | | | | | | | As part of fixing a recent security issue, DownloadManager now needs to issue Uri permission grants for all downloads. However, if an app that requested a download is upgraded or otherwise force-stopped, the required permission grants are removed. We could tell DownloadManager about the app being stopped, but that would be racy (due to background broadcast), and waking it up would degrade system health. Instead, as a special case we now only consider clearing DownloadManager permission grants when app data is being cleared. Bug: 32172542, 30537115 Test: builds, boots, app upgrade doesn't clear grants Change-Id: I7e3d4546fd12bfe5f81b9fb9857ece58d574a6b9 (cherry picked from commit 23ec811266fb728cf159a90ce4882b3c9bac1887) (cherry picked from commit 6eee8e37fd06bd47dd19b8503bc30cc8ccaf72a7) (cherry picked from commit 36772fc2263e06972add737660392afd246da15e)
* Download: add to support pause/resume download by manualqqzhou2016-01-251-0/+5
| | | | | | | | | | We add pause and resume API here so that application can pause and resume downloads manually by DownloadManager. This contains two points: 1. add pause and resume download APIs. 2. add another paused reason for this download status. Change-Id: I606b48ca20f43bcc6c119683818c2ab6ff03bfe5
* Allow saving to Downloads.Jeff Sharkey2013-09-231-0/+2
| | | | | | | | Uses new column to mark writability. Also filter file selection in create mode to only allow writable files. Bug: 10667164, 10893268 Change-Id: I90f74efbb7ac634fbdb3cc02a904a96a434d3605
* Define failed connections column, and reset.Jeff Sharkey2013-01-171-0/+3
| | | | | | | When retrying a download, always reset the failed connections count. Bug: 8022478 Change-Id: I0d799d82dc7a04fe788b8c5faee0045d1e1a9c60
* Add ALLOW_METERED column to DownloadManager.Jeff Sharkey2012-04-181-4/+15
| | | | | | | | Also allow isActiveNetworkMetered() to inspect networks without requiring ACCESS_WIFI_STATE. Bug: 3001465 Change-Id: Ibc23577d4ad941e4f93db417be6b046881dcbfb1
* Mapping from DownloadManager status to string.Jeff Sharkey2012-04-131-0/+31
| | | | Change-Id: I159aa5f9c7289d6935436d78523b0628482bdc91
* Remove unused android.net.Downloads.Jeff Sharkey2012-03-201-0/+16
| | | | | | | It's another set of constants that can be confused with those in android.provider.Downloads. Change-Id: I78ac058fa264d59a81f7655ab101c3fb2c8c17ff
* Notify policy listeners about metered ifaces.Jeff Sharkey2011-06-171-8/+8
| | | | | | | | | | Currently, kernel definition of metered networks is applied at the interface level. This change maintain list of those metered ifaces and notifies policy listeners, like ConnectivityService. (This gives us a consistent picture of when a network would be blocked.) Bug: 4601393 Change-Id: I277d5ca96ab967a1c1c3f1da8f9587557cd6d74c
* DownloadManager flags for network policy.Jeff Sharkey2011-06-161-0/+9
| | | | | | | Handful of DownloadManager flags to record when a download was paused because of NetworkPolicyManager rules. Change-Id: I99fc47f529cb6c8a42dbeca049e0cd0f1556eac4
* bug:3425749 send notification for completed downloadVasu Nori2011-02-101-0/+11
| | | | Change-Id: Ib46df5eaa9316fe0fc843fee1e4597e22768f4a8
* bug:3435895 change a couple of retryable error constants to < 400Vasu Nori2011-02-081-13/+13
| | | | | | so that they are not considered permanent failures Change-Id: I4513e6abcce127f78b5be98ab78c985ed698e43e
* am 9ec496b4: am e1cbd0a8: Revert "Merge "bug:3414192 new API to designate a ↵Vasu Nori2011-02-031-6/+0
|\ | | | | | | | | | | | | download to be OTA update" into honeycomb" * commit '9ec496b484305defa6cbb691b85836ace8b73a02': Revert "Merge "bug:3414192 new API to designate a download to be OTA update" into honeycomb"
| * Revert "Merge "bug:3414192 new API to designate a download to be OTA update" ↵Vasu Nori2011-02-031-6/+0
| | | | | | | | | | | | | | into honeycomb" This reverts commit 6bc710f769618e87b98d51cd02241e6b1a2fb653, reversing changes made to 7ba35f5ab3c838c7f1b3ab957be685ac1f506b2a.
* | am 99e8e047: am 6bc710f7: Merge "bug:3414192 new API to designate a download ↵Vasu Nori2011-02-021-0/+6
|\ \ | |/ | | | | | | | | | | to be OTA update" into honeycomb * commit '99e8e0470249ce145003cc1eabc5ae391af34a06': bug:3414192 new API to designate a download to be OTA update
| * bug:3414192 new API to designate a download to be OTA updateVasu Nori2011-02-021-0/+6
| | | | | | | | Change-Id: Iae2f6185e130324ad956f594e78b1d8b2176c808
* | bug:3048327 (master) ability to add completed download to dnload mgrVasu Nori2011-01-221-0/+6
|/ | | | Change-Id: I073436c97d5d7cb8ea6a823488a451017dac3ff2
* bug:3264401 changes to support usage of new downloads dir in /dataVasu Nori2010-12-141-0/+7
| | | | Change-Id: I209a624523f727d47a4a8f758c13df5d4eac614f
* am 1de6ca69: am 938d0972: Merge "Grant ACCESS_ALL_DOWNLOADS to ↵Kenny Root2010-12-011-1/+8
|\ | | | | | | | | | | | | DefaultContainerService" into gingerbread * commit '1de6ca69cc541ccdd651071c8bd5629af4e09664': Grant ACCESS_ALL_DOWNLOADS to DefaultContainerService
| * Grant ACCESS_ALL_DOWNLOADS to DefaultContainerServiceKenny Root2010-12-011-1/+8
| | | | | | | | | | | | | | | | Be compatible with the old DownloadProvider behavior of being able to operate on content URIs returned from .insert() Bug: 3242328 Change-Id: I7dad15ac0fefa867c3c8a33a579fc9899ac80262
* | changes to support Change-Id: I572fdfd6d34dbb5a0577c6cf14664b6f2d5700b4Vasu Nori2010-11-221-0/+21
| | | | | | | | | | | | 1. add new column constants for : COLUMN_last_updatesrc 2. send downloadid in the uri wherever possible. Change-Id: I49a18506060bf292a0750790042e94b0a35ea9bf
* | add column to downloads table to store error msg when a download failsVasu Nori2010-11-111-0/+7
| | | | | | | | | | | | | | | | | | | | useful for debugging for bugs like bug:3187299 without this error message, one doesn't know WHY downloads fail. there is a STOPSHIP comment around storage of this error message in database. Change-Id: I1fa49ee9eb97be16aced1611ab30a286b0b6c8d2
* | add API to return Uri for the given downloaded file id & get mimetypeVasu Nori2010-11-041-0/+17
| | | | | | | | Change-Id: I1f5dd734e394db0056579a3a0c26862fee27981e
* | make notifications appear during downloading AND after completionVasu Nori2010-10-271-3/+5
| | | | | | | | | | bug:3132773 Change-Id: I012859fa86055f322069d5120b110c4c8887fb61
* | remove duplicate codeVasu Nori2010-10-201-550/+0
|/ | | | Change-Id: I60faf921de4b9add619e2450e0a19a111ede7984
* bug:3069735 in Download UI app, handle deletes correctlyVasu Nori2010-10-131-0/+26
| | | | | | | | | | | | | | gingerbread. (for more detailed comments, please see the dependent CL Change-Id: Ib90eb9e647f543312c865d3bbf9a06fb867a648b ) 2 changes in this CL. 1. add 2 new columns to downloads table in downloads.db: mediaprovider_uri = downloaded file's content_uri in mediaprovider db deleted = flag is set to true if a file is to be deleted 2. download UI app shows only those files whose 'deleted' flag is not set Change-Id: I47c5f72b0a0b354fac3abe3a97752130b8189794
* Have download manager give more details when downloads are pausedSteve Howard2010-09-291-37/+17
| | | | | | | | | | | | | | | | | This change introduces more detailed reporting of why downloads are paused in the download manager. First, it adds new, more detailed status constants in android.provider.Downloads for when a download is paused, in place of the old catch-all STATUS_RUNNING_PAUSED. I've eliminated some dead code there as well to ease the change. Second, in the public API, it changes COLUMN_ERROR_CODE to COLUMN_REASON, which now reports useful info for STATUS_PAUSED in addition to STATUS_FAILED. It adds some new PAUSED_* constants for reason values when a download is paused, and adds code to generate these values appropriately. Change-Id: Ie617d1c2c59357375e19466086923ace5e2fb122
* Support for download manager "queue for wifi" dialogsSteve Howard2010-09-211-0/+8
| | | | | | | New DB column and new secure setting for recommended max download size over mobile. Change-Id: If87acda62140ad6d8f923a000a5ff9232021e1a3
* New error status for "destination file already exists".Steve Howard2010-09-201-1/+6
| | | | | | | | Also changing the behavior of the local URI column slightly to better match the spec -- it should return the client-provided destination so that it's valid even if the download failed. Change-Id: Ibf9c07519e647e677ebac8b334b9f2e930e47033
* Support new URI structure for download provider.Steve Howard2010-09-151-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | I'm changing the URI structure for the download provider a bit. The download provider will now support two views into its data: * content://downloads/my_downloads... will basically be the current view, which is limited to downloads owned by the calling UID * content://downloads/all_downloads... will include all downloads in the system, but will require special permission In addition to making things more clear, this change will allow for granting URI permissions to individual downloads via the /all_downloads/... URI. This change includes the framework changes necessary to support the new structure. The bulk of the work will be in the DownloadProvider code itself. In addition, this change makes DownloadManager return a content URI rather than a file URI for /cache downloads. This avoids any confusion in clients, which wouldn't be able to open the file directly, and better supports granting permissions to viewers. Change-Id: Ie548b927817ac774111990dd0c9d26aaf979d1ea
* Support UI visibility and restarting in download manager.Steve Howard2010-09-121-0/+8
| | | | | | | | | | | | | | | | First, this change adds a column to the downloads table specifying whether a download should be displayed in the system downloads UI. It adds a public method to set this parameter when requesting a download, and a hidden method to filter queries based on this paramter (such filtering could be made public later, but it's not strictly necessary right now). Second, this change adds support for restarting a completed/failed download as a hidden method on DownloadManager. Currently it only works from the download manager's process - it'll be used by the new download manager UI. Change-Id: I15eda1a6e3717d1ce947a810b25ad3540cce809e
* New download manager error code when we can't resume.Steve Howard2010-08-161-0/+10
| | | | | | | | | Adding DownloadManager.ERROR_CANNOT_RESUME for when we can't resume an interrupted download (because the server didn't provide an ETag or doesn't support range requests), as well as the necessary private status code in Downloads.Impl. Change-Id: I5a66f1e1964198552ab2216aa6d3cc0db2254e21
* Make downloads visible by default.Steve Howard2010-08-061-1/+7
| | | | Change-Id: I8f8b325658d8afc964bddd3f1c03ed20e6bd10aa
* New permission for non-purgeable cache downloads.Steve Howard2010-07-231-0/+7
| | | | | | | | This permission allows an app to use the public download manager API to download files to the cache partition that won't be automatically deleted when the download manager needs space. Change-Id: Id9a5cd61c940df22765b358290b8ad8ceeff493e
* Remove SEE_ALL_EXTERNAL permission from Download Manager.Steve Howard2010-07-211-8/+0
| | | | | | | I'm removing this currently unused functionality from the Download Manager implementation, so the constant might as well go. Change-Id: I4f0970211201881a8426b83b5275408cd14c3377
* DL manager support for broadcasts + connectivity controlSteve Howard2010-07-211-5/+24
| | | | | | | * Additions to DownloadManager to support control of broadcast intents, allowed network types, and roaming control. This includes new constants and added implementation. * New DB columns to hold connectivity flags and one to indicate whether the download was initiated through the public API; this is used to change behavior related to broadcast intents and connectivity controls. Change-Id: I2e8e4ce92cde7889a0f24dc43b86c596c73c0eaa
* Interface support for custom HTTP headers in DL managerSteve Howard2010-07-151-0/+21
| | | | | | * constants for new DB table, keys for including headers in a DownloadProvider.insert() call, and new URIs for retrieving headers * support in DownloadManager to pass headers to the provider
* Download manager support for file URIs + last modified timeSteve Howard2010-07-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | First, in the download manager public API, I'm changing COLUMN_REQUESTED_TIMESTAMP to COLUMN_LAST_MODIFIED_TIMESTAMP, a field that already exists in the download manager. Upon inspection of existing users of this field, it looks like there are some good use cases -- for instance, looking at when a download completed. And if I'm exposing that timestamp, there's no need to also expose the requested timestamp. Second, this change includes support for file URI destinations: * add DESTINATION_FILE_URI for use by the DownloadManager wrapper * make DownloadManager use it appropriately The backend support is in a separate change (since it's in a separate project). Also fixing a bug with file URI construction when DownloadManager fills in COLUMN_LOCAL_URI. Change-Id: I5bb93a222cd23215c2a03ed9f68d7f140454f7f2
* Add a new permission and remove createTitleFromFilename.Leon Scroggins2010-02-051-23/+8
| | | | | | Part of http://b/issue?id=2384554 Requires a change to packages/providers/DownloadProvider
* b/2383073 Add fine-grained status codes for failed downloads.Attila Bodis2010-01-261-0/+32
| | | | | | Introduces new download status codes (STATUS_DEVICE_NOT_FOUND_ERROR and STATUS_INSUFFICIENT_SPACE_ERROR) to allow apps to show more accurate and informative error messages upon failed downloads.
* Create a common method for updating the title of a download from the filename.Leon Scroggins2010-01-211-0/+27
| | | | This method will be used by the DownloadProvider and the BrowserDownloadPage.
* @hide the individual members instead of the whole classJean-Baptiste Queru2010-01-151-6/+73
| | | | | | Bug: 2245521 Change-Id: I8dad1e8d4e1b55dbb9d33b6990c1bd420e914be5
* Remove the BaseColumns inheritanceJean-Baptiste Queru2010-01-151-1/+1
| | | | | | | | This is done so that it doesn't bleed into a public API Bug: 2245521 Change-Id: I2e5f728553f074f0dc2e8a3dfdf90b1c1f189bad
* Introduce a non-SDK class to hold the implementation detailsJean-Baptiste Queru2010-01-141-0/+489
| | | | | | | | | | | | | This is an exact clone of the "public" class, so that applications that access the raw content provider directly (i.e. Browser) can continue doing so, at the expense of not being buildable with the SDK. The Download Provider itself will also use those constants. Bug: 2245521 Change-Id: I15f8ca8a3b69719cfbf403fc2607aac0d3c2b79a
* Fix 1855: Restore constants to pre-cupcake values.Jean-Baptiste Queru2009-02-061-11/+17
| | | | | | | | Since some of those constants are used in the persistent database, modifying them for cupcake meant that the new code was getting confused by the old persistified data after an upgrade to cupcake, teh most visible symptom being that downloads that had been initiated from the browser would re-appear in the notifications.
* Remove old (unused) download manager APIsJean-Baptiste Queru2009-02-021-23/+0
|
* Introduce new names for the download manager API fields.Jean-Baptiste Queru2009-01-211-23/+46
| | | | | | | The new names will allow for better consistency and better API documentation if/when they're made public in the SDK. This will be followed by a later change that removes the old names
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-159/+62
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+604