summaryrefslogtreecommitdiffstats
path: root/src/com/android/providers
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | Implement multi-network downloadsRobin Lee2016-04-073-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Downloads should use the default network for the caller. This prevents applications from, for example, bypassing VPN by routing all requests through the DownloadProvider. Bug: 27074270 Change-Id: I7830226dd2910757d3a5c78f373330f84637ccfa
* | | | | | | | Remove stale download notifications.Jeff Sharkey2016-04-041-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 27971263 Change-Id: Ia68d43828ecc32c1b6a656a0d3bb751b2a2e7881
* | | | | | | | Avoid flashing download notifications.Jeff Sharkey2016-03-302-3/+14
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When service starts, use new API to read the current set of notification tags from the system instead of clearing and starting from scratch. Bug: 27634130 Change-Id: I049fe5e445a62a52042d7638c2cb50417977435f
* | | | | | | Remove chmod(0644) for finished downloads.Jeff Sharkey2016-03-211-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that PackageInstaller can read APKs from content:// Uris, we don't need to make downloads world-readable. This is mostly just cleanup, since our top-level private data directory is no longer o+x, so other apps can't traverse in anyway. Bug: 5464052 Change-Id: I45de6a40c28b85c64d5afbc13068fe3ae8341d93
* | | | | | | Mark incomplete downloads as partial.Steve McKay2016-03-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 27526321 Change-Id: Ic29bc235242a8b87ab8321ee201cb7918594366f
* | | | | | | Use resolved path for both checking and opening.Jeff Sharkey2016-02-082-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids a race condition where someone can change a symlink target after the security checks have passed. Bug: 26211054 Change-Id: I5e1a2343d631109c21a4c5b2d8d00b2946756680
* | | | | | | Merge "Migrate the DownloadProvider's trampoline to use SAF Uris."Tomasz Mikolajewski2016-02-031-4/+7
|\ \ \ \ \ \ \
| * | | | | | | Migrate the DownloadProvider's trampoline to use SAF Uris.Tomasz Mikolajewski2016-02-031-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I551f830637e023f810a08ba549ecbb7f717b4e9c
* | | | | | | | Always return FLAG_ARCHIVE for archives in DownloadProvider.Tomasz Mikolajewski2016-02-021-7/+6
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic for manage/non-manage UI is moved to DocumentsUI. Bug: 26321218 Change-Id: I1c9d24bdee493d31fe3bcea2eed877529bc1c32a
* | | | | | | Temporary hack to keep file:// Uris working.Jeff Sharkey2016-01-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 26860922 Change-Id: I9e6d513dedd6c82bd4a582542a9094394d74db5d
* | | | | | | Merge "Revert "Use resolved path for both checking and opening."" into ↵Jeff Sharkey2016-01-232-8/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mnc-dr1.5-dev am: ce08ce4bdb am: 15185cff91 * commit '15185cff911670eba8f742fe8a2f26de5ed657fe': Revert "Use resolved path for both checking and opening."
| * | | | | | Revert "Use resolved path for both checking and opening."Jeff Sharkey2016-01-222-8/+6
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 366af2ee1f841615d44ab770b537112d769eed05. Change-Id: Id1155425ebcae23be8ce3916f19dda82eee992c4
| * / / / / Use resolved path for both checking and opening.Jeff Sharkey2016-01-142-6/+8
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids a race condition where someone can change a symlink target after the security checks have passed. Bug: 26211054 Change-Id: I5842aaecc7b7d417a3b1902957b59b8a1f3c1ccb
* | | | | Merge "Assign a null timestamp to active downloads."Ben Kwa2016-01-091-1/+5
|\ \ \ \ \
| * | | | | Assign a null timestamp to active downloads.Ben Kwa2016-01-081-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it such that ordering downloads by timestamp doesn't continually shuffle stuff around if the UI happens to be sorting files by mod time. BUG=26417297 Change-Id: Ibe51513ee5d27ff959f8e7a2a5bad7244c3a731f
* | | | | | Opening downloads also needs filename access.Jeff Sharkey2016-01-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 26454235 Change-Id: I61d68f694e6460b46a56b111092094a3111c291b
* | | | | | Use resolved path for both checking and opening.Jeff Sharkey2016-01-072-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids a race condition where someone can change a symlink target after the security checks have passed. Bug: 26211054 Change-Id: I5842aaecc7b7d417a3b1902957b59b8a1f3c1ccb
* | | | | | Request access to the filename column.Jeff Sharkey2016-01-071-0/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise it would throw at us because it's deprecated for third-party apps. Bug: 26438975 Change-Id: Ifd8f0b61ce475a009ef68ef4cb29f5f3780ced70
* | | | | Merge "Wire zip archives to Downloads."Tomasz Mikolajewski2015-12-251-6/+39
|\ \ \ \ \
| * | | | | Wire zip archives to Downloads.Tomasz Mikolajewski2015-12-251-6/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 20176812 Change-Id: Id7b207898d5b0fb2013d07e2da3302b09e4995fe
* | | | | | Report to DeviceIdleController when downloads are active.Dianne Hackborn2015-11-121-0/+15
|/ / / / / | | | | | | | | | | | | | | | Change-Id: Ie0373c1f2a6be16cd1cfc197a8350582c00c6871
* | | | | am 962dc684: am 0e4082c8: am 6a25eda3: am 94fc3343: am 8b2880ba: Give ↵Jeff Sharkey2015-07-291-1/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | secondary users read-only physical cards. * commit '962dc684806d1104eb30d4fb1aa0391e917a88c9': Give secondary users read-only physical cards.
| * | | | Give secondary users read-only physical cards.Jeff Sharkey2015-07-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow method refactoring so we only consider writable locations. Bug: 22787184 Change-Id: Ib8b037216d23ab474d7e0df427671d174eaf030a
* | | | | am fe7f7654: am c0c1c15d: am 4a4f35e4: am c478f1e7: am b8bc2a76: Switch to ↵Jeff Sharkey2015-07-251-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | proxy variants of app-ops calls. * commit 'fe7f76546048b04f1590aea96617efbe0a4bd9d2': Switch to proxy variants of app-ops calls.
| * | | | Switch to proxy variants of app-ops calls.Jeff Sharkey2015-07-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Bug: 22718722 Change-Id: I9c054956c3b3655332475607d6919dc34515e550
* | | | | am b74a55a3: am f5170c41: am 7a61721e: am 546250aa: am ed30deae: Relax ↵Jeff Sharkey2015-07-144-26/+114
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | permissions on package-specific paths. * commit 'b74a55a36392d514f27952e7e2bf4af809ab48ae': Relax permissions on package-specific paths.
| * | | | Relax permissions on package-specific paths.Jeff Sharkey2015-07-144-26/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally apps must hold the WRITE_EXTERNAL_STORAGE permission in order to use DownloadManager. However, now that the platform has relaxed permissions on package-specific directories, we relax the DownloadManager check in a similar way. This also opens up using DownloadManager to save files on secondary external storage devices. Fix bug so that we now check the relevant volume state when thinking about resuming a download. Bug: 22135060 Change-Id: If439340ea48789ea167f49709b5b69a4f0883150
* | | | | Add "Cancel" action to downloads in notification.Oren Blasberg2015-06-253-1/+61
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a "Cancel" action to in-progress downloads shown in notification pane. We add a new action type for a new "cancel" intent sent by DownloadNotifier to DownloadReceiver, which in turn cancels the download by way of DownloadManager. BUG=19972464 Change-Id: I83cd2f40e1442c327f756027b99f9eac913a0e70
* | | | Create a handler threadTodd Kennedy2015-06-191-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The onCreate() method [where we initialize the handler] runs on the main thread. This means the ParcelFileDescriptor also runs tasks involving disk access on the main thread. We need to create a separate thread to run the Content Provider's handler. Bug: 19718299 Change-Id: Ia3661fafd3442ad6260f04253ba24ddf83b176b2
* | | | Actually delete files when rows are deleted.Jeff Sharkey2015-06-161-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise they're orphaned until the next idle maintenance pass. Bug: 21786983 Change-Id: I6eb2240d657366b65482bd3a0d5683e5d34a541a
* | | | Don't call size() on a null ListChristopher Tate2015-06-081-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JobScheduler.getAllPendingJobs() can return null when there are none. Deal with it. Bug 21642868 Change-Id: I11fcc6e146f9db51e03dcf57f7518bb7878fbd28
* | | | Sanitize display names, keep extensions intact.Ben Kwa2015-04-221-8/+4
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the newly factored FileUtils sanitize the requested display names to be valid FAT filenames, and also allow any extension that maps to the requested MIME type. BUG=20157955 Change-Id: Ic37863a3362a941d81632bd4a7562dae40053652
* / / Make DownloadProvider honor the cleartext traffic policy.Alex Klyubin2015-04-013-0/+59
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the Provider-side of the DownloadManager framework honor the per-UID cleartext network traffic policy. The policy is enforced in the Provider rather than in its client (DownloadManager) because download URLs could get redirected between HTTPS and HTTP and only the Provider currently has visibility into and control over this. Whether cleartext network traffic is permitted is a per-package policy. However, the DownloadProvider can only access the UID of the requesting application. Multiple packages can run under the same UID. In that scenario, cleartext traffic is permited for the UID if cleartext traffic is permitted for any of the packages running under the UID. This could be improved by making the DownloadManager provide the package name in addition to the UID. Bug: 19215516 Change-Id: Ib37585a7a2fc2869954d52a1b08052926f49bc9b
* | Can not continue to download after powering on the phoneBenson Huang2015-01-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Launch chrome and open www.baidu.com -> Choose "software" in the site navigation -> Tap "games" option, choose one apk to download -> During downloading, power off the phone -> Power on the phone and check, it can't continue to download apk. The fix is to add one condition for retrying to download when IO exception happens (i.e. Failed to open for writing: java.io.FileNotFoundException). Bug 18834618 Review: https://partner-android-review.git.corp.google.com/#/c/193436 Signed-off-by: Benson Huang <benson.huang@mediatek.com> Change-Id: I2f975ff7ffedfc4136fb250dcb5ef8fdca4a367d
* | Use FileUtils to validate FAT filenames.Jeff Sharkey2014-11-261-50/+1
| | | | | | | | | | Bug: 18512473 Change-Id: I686c7c3487f789dc0437513fbc6fed54dc62721f
* | Connection: close is enough to know length.Jeff Sharkey2014-11-101-5/+9
| | | | | | | | | | | | | | | | Now that we're defeating connection reuse, we have one additional type of response where the length is known. Bug: 18306491 Change-Id: I19657c565238f07fd89a55a5dbf1e85748f6e7c3
* | Defeat connection reuse to really cancel.Jeff Sharkey2014-11-071-0/+4
| | | | | | | | | | | | | | | | | | Otherwise servers may continue streaming large downloads into the kept-alive socket. This changes to always close the socket, sending a clear signal to server. Bug: 16153076 Change-Id: I3e7fefce4f82b5f80abaab58874cc4c4374d2bfb
* | Ensure that downloads stop quickly.Jeff Sharkey2014-10-271-8/+25
| | | | | | | | | | | | | | | | | | | | In some cases the provider may have marked a download as deleted, but the content change notification may lag several seconds. To stop as soon as possible, assert that we're not deleted when writing our progress updates. Bug: 16405936 Change-Id: I994b746056d0427c626355e0815234ff5b73198c
* | am 3ee03ac3: am e24609e8: Trim stale downloads from third-party apps.Jeff Sharkey2014-10-171-5/+47
|\| | | | | | | | | * commit '3ee03ac36f0f849b78936cf18972fe2f24a61722': Trim stale downloads from third-party apps.
| * Trim stale downloads from third-party apps.Jeff Sharkey2014-10-161-5/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Buggy third-party apps can enqueue lots of downloads and then forget to remove them, causing DownloadManager to stop functioning. This change removes any downloads that match _all_ of the following conditions: 1. Download status is in a terminal (non-pending) state, usually a concrete success or failure. 2. Download hasn't been touched in over a week. 3. Download is not visible in UI. Bug: 17785419 Change-Id: Id82752fd6935371c1af682205d35f7ba35169473
* | Fix internationalization of percentage formatting in DownloadProvider.Elliott Hughes2014-10-102-3/+7
|/ | | | | Bug: 15476051 Change-Id: I085c074f1bb66631872712cab68bcaf6ee7ba7dc
* Colored notificationsSelim Cinek2014-08-271-0/+2
| | | | | Bug: 17128331 Change-Id: Ie2529189e4d62c7dc385f9d36c70ac412fb4159c
* fallocate() returning ENOSYS is okay.Jeff Sharkey2014-08-261-2/+2
| | | | | | | Fall back just like ENOTSUP. Bug: 17285472 Change-Id: Ice4954726c14a0e84c39c5469d573644588934ae
* Whoops, clear identity to get internal columns.Jeff Sharkey2014-08-051-1/+11
| | | | | Bug: 16822344 Change-Id: Ib90e171cbb7babc7a3eea59de5cb899c79fadf94
* Scan after writing download files.Jeff Sharkey2014-08-054-23/+43
| | | | | | | | Kicks off media scanner after files are written, usually through a DocumentsProvider. Bug: 13557203 Change-Id: I4e29b778b4e19a217f60c1e415c4d814724752d3
* Transition the Download Service's cleanup work to a scheduled JobChristopher Tate2014-06-162-8/+50
| | | | | | | | | ...preparatory to finally removing the scratchpad "idle maintenance" infrastructure from the product. Bug 14993295 Change-Id: I1e84247de19e616910db1781b2c399a8b15a805c
* am f04a7690: am 90e7485d: am 02562d30: Merge "Avoid leaking cursors"Jeff Sharkey2014-05-101-20/+30
|\ | | | | | | | | * commit 'f04a7690b53288c98c07e0aa05214cceebea1331': Avoid leaking cursors
| * Merge "Avoid leaking cursors"Jeff Sharkey2014-05-101-20/+30
| |\
| | * Avoid leaking cursorsMattias Nilsson2014-04-011-20/+30
| | | | | | | | | | | | | | | | | | | | | Adding try/finally blocks to make sure that cursor resources are let go Change-Id: I596074aa9ab5752f91a26b5a03e1f39c23c64a5f
| * | Track API package change.Elliott Hughes2014-04-281-4/+4
| |/ | | | | | | Change-Id: Ie2f35386e48894a9c9afb9717af90a5628dcd79b