summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* DownloadProvider: Add support for manual pause/resumestaging/lineage-17.0_merge-android-10.0.0_r9Zhao Wei Liew2019-12-118-9/+171
| | | | | | | | | | Implement the following features: - Manually pause/resume individual downloads in DownloadManager - Manually pause/resume all downloads in notification Based on commit ecd609e7017b8a69688bbae25c17d878ea305f19. Change-Id: I433cdee2de8b3add0248bbb0a9d02f8da4e5bb38
* DownloadProvider: Display download speed in notificationLasse Brudeskar Vikås2019-12-113-6/+89
| | | | | | | Add the current total download speed to in-progress downloads shown in the notification pane. Change-Id: I801dbe61c7ee59d0c1d14d5851ad6dc3a7678499
* Snap for 5907634 from 0d5b9efb6e220f98ba9a0cafee6bb7fe1daba8ac to ↵android-build-team Robot2019-09-291-3/+3
|\ | | | | | | | | | | qt-qpr1-release Change-Id: Ifdfec766c9025d46b68b0e01b835ed53ef52cf52
| * Import translations. DO NOT MERGEBill Yi2019-09-281-3/+3
| | | | | | | | | | Change-Id: I8d0b7ebd57432da1082d53229d7ead23d39618df Auto-generated-cl: translation import
* | Snap for 5876498 from faf439ba2fe50aa0c2678455b97acf3dbef6266d to ↵android-build-team Robot2019-09-142-342/+107
|\| | | | | | | | | | | qt-qpr1-release Change-Id: Ib312967c8cb4e3f8605f666db6a384e420ac9ebd
| * [automerger skipped] Merge "RESTRICT AUTOMERGE Enable stricter ↵Jeff Sharkey2019-09-120-0/+0
| |\ | | | | | | | | | | | | | | | | | | | | | SQLiteQueryBuilder options." into pi-dev am: abb84003e8 -s ours am: 74e800be1a am: 71cb21b6db Change-Id: Icd99f07df0b57d2fae995e791512a78c9810192f
| | * [automerger skipped] Merge "RESTRICT AUTOMERGE Enable stricter ↵Jeff Sharkey2019-09-120-0/+0
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | SQLiteQueryBuilder options." into pi-dev am: abb84003e8 -s ours am: 74e800be1a Change-Id: I3cddb4a5ea4af86ce8d61fb283f9ac9c0e3eb62e
| | | * [automerger skipped] Merge "RESTRICT AUTOMERGE Enable stricter ↵Jeff Sharkey2019-09-120-0/+0
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SQLiteQueryBuilder options." into pi-dev am: abb84003e8 -s ours am skip reason: subject contains skip directive Change-Id: Ie9a6c8887dbbeea2f1ddb38df4b4bcd92e795e79
| | | | * Merge "RESTRICT AUTOMERGE Enable stricter SQLiteQueryBuilder options." into ↵Jeff Sharkey2019-09-122-345/+107
| | | | |\ | | | | | | | | | | | | | | | | | | pi-dev
| * | | | | [automerger skipped] RESTRICT AUTOMERGE Enable stricter SQLiteQueryBuilder ↵Jeff Sharkey2019-09-120-0/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | options. am: d3e5c766a1 -s ours am: 703392e548 am: 9586551095 Change-Id: I146127732b2d7c5bba0c95c604c39a72d66236cb
| | * | | | [automerger skipped] RESTRICT AUTOMERGE Enable stricter SQLiteQueryBuilder ↵Jeff Sharkey2019-09-120-0/+0
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | options. am: d3e5c766a1 -s ours am: 703392e548 Change-Id: I3ee1977f9a1a0276dbe1e4490ba9c0c2c06cac1f
| | | * | | [automerger skipped] RESTRICT AUTOMERGE Enable stricter SQLiteQueryBuilder ↵Jeff Sharkey2019-09-120-0/+0
| | | |\ \ \ | | | | | |/ | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | options. am: d3e5c766a1 -s ours am skip reason: subject contains skip directive Change-Id: I6d1d26c7f58e6ab263d642d75403d51240a0429b
| | | | * | RESTRICT AUTOMERGEJeff Sharkey2019-09-062-345/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable stricter SQLiteQueryBuilder options. Malicious callers can leak side-channel information by using subqueries in any untrusted inputs where SQLite allows "expr" values. This change starts using setStrictColumns() and setStrictGrammar() on SQLiteQueryBuilder to block this class of attacks. This means we now need to define the projection mapping of valid columns, which consists of both the columns defined in the public API and columns read internally by DownloadInfo.Reader. We're okay growing sAppReadableColumnsSet like this, since we're relying on our trusted WHERE clause to filter away any rows that don't belong to the calling UID. Remove the legacy Lexer code, since we're now internally relying on the robust and well-tested SQLiteTokenizer logic. Bug: 135270103 Bug: 135269143 Test: atest DownloadProviderTests Test: atest CtsAppTestCases:android.app.cts.DownloadManagerTest Change-Id: I302091ceda3591785b2124575e89dad19bc97469
| * | | | | [automerger skipped] RESTRICT AUTOMERGE Enable stricter SQLiteQueryBuilder ↵Jeff Sharkey2019-09-120-0/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | options. am: a9533dcd62 am: 84343cfa93 am: 060def8608 -s ours am: 232eaee57b -s ours am: 6b98ed38e5 am: bfd2ad60f7 Change-Id: I1e390c5e840c7f923c8f35ffb5fe10ea8cbe9624
| | * | | | [automerger skipped] RESTRICT AUTOMERGE Enable stricter SQLiteQueryBuilder ↵Jeff Sharkey2019-09-120-0/+0
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | options. am: a9533dcd62 am: 84343cfa93 am: 060def8608 -s ours am: 232eaee57b -s ours am: 6b98ed38e5 Change-Id: I9ac6578f786bb62f5d3249f0e1e6118a65b2f668
| | | * | | [automerger skipped] RESTRICT AUTOMERGE Enable stricter SQLiteQueryBuilder ↵Jeff Sharkey2019-09-120-0/+0
| | | |\ \ \ | | | | | |/ | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | options. am: a9533dcd62 am: 84343cfa93 am: 060def8608 -s ours am: 232eaee57b -s ours am skip reason: subject contains skip directive Change-Id: I188dce6a804e8ba92b0b06d201dc57416b8283eb
| | | | * | [automerger skipped] RESTRICT AUTOMERGE Enable stricter SQLiteQueryBuilder ↵Jeff Sharkey2019-09-120-0/+0
| | | | |\ \ | | | | | |/ | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | options. am: a9533dcd62 am: 84343cfa93 am: 060def8608 -s ours am skip reason: subject contains skip directive Change-Id: I55d1b6622a530e642720abdfced4d81933802083
| | | | | * RESTRICT AUTOMERGE Enable stricter SQLiteQueryBuilder options. am: a9533dcd62Jeff Sharkey2019-09-122-345/+107
| | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 84343cfa93 Change-Id: I2d61eace0dd6ddd1aed8564bf8087741b3367655
| | | | | | * RESTRICT AUTOMERGE Enable stricter SQLiteQueryBuilder options.Jeff Sharkey2019-09-122-345/+107
| | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: a9533dcd62 Change-Id: If0c1c25c5a3fa6e091b48ae47df7766ab85734f7
| | | | | | | * RESTRICT AUTOMERGEJeff Sharkey2019-09-102-345/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable stricter SQLiteQueryBuilder options. Malicious callers can leak side-channel information by using subqueries in any untrusted inputs where SQLite allows "expr" values. This change starts using setStrictColumns() and setStrictGrammar() on SQLiteQueryBuilder to block this class of attacks. This means we now need to define the projection mapping of valid columns, which consists of both the columns defined in the public API and columns read internally by DownloadInfo.Reader. We're okay growing sAppReadableColumnsSet like this, since we're relying on our trusted WHERE clause to filter away any rows that don't belong to the calling UID. Remove the legacy Lexer code, since we're now internally relying on the robust and well-tested SQLiteTokenizer logic. Bug: 135270103 Bug: 135269143 Test: cts-tradefed run cts -m CtsAppTestCases -t android.app.cts.DownloadManagerTest Change-Id: I302091ceda3591785b2124575e89dad19bc97469
| * | | | | | | RESTRICT AUTOMERGE Enable stricter SQLiteQueryBuilder options. am: ffec00b013Jeff Sharkey2019-09-112-342/+107
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 93c92f6502 Change-Id: Ide7ac00ef8d0411beb58168d295b31e697349a46
| | * | | | | | RESTRICT AUTOMERGE Enable stricter SQLiteQueryBuilder options.Jeff Sharkey2019-09-112-342/+107
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: ffec00b013 Change-Id: I2e27d1e54090eb38c113cd855f715017fe116c96
| | | * | | | | RESTRICT AUTOMERGE Enable stricter SQLiteQueryBuilder options.Jeff Sharkey2019-09-102-342/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Malicious callers can leak side-channel information by using subqueries in any untrusted inputs where SQLite allows "expr" values. This change starts using setStrictColumns() and setStrictGrammar() on SQLiteQueryBuilder to block this class of attacks. This means we now need to define the projection mapping of valid columns, which consists of both the columns defined in the public API and columns read internally by DownloadInfo.Reader. We're okay growing sAppReadableColumnsSet like this, since we're relying on our trusted WHERE clause to filter away any rows that don't belong to the calling UID. Remove the legacy Lexer code, since we're now internally relying on the robust and well-tested SQLiteTokenizer logic. Bug: 135270103, 135269143 Test: atest DownloadProviderTests Test: atest CtsAppTestCases:android.app.cts.DownloadManagerTest Change-Id: I8e595e1470df586a3d593b7851305da413e44347
* | | | | | | | Snap for 5849705 from a1959c050e285fe6245bd0aebddd1cfc38b16dd0 to ↵android-build-team Robot2019-09-042-9/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qt-qpr1-release Change-Id: Iffc2da39c23b4c0e01745739dcff3d2b9f790390
| * | | | | | | Import translations. DO NOT MERGEBill Yi2019-09-032-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Auto-generated-cl: translation import Bug: 64712476 Change-Id: If4d6ab45c3d78ba95fa3e75642acfe64c81c0dd5
* | | | | | | | Snap for 5814541 from 8c12b6687ed363fe93c6737719b2e86913cc849e to ↵android-build-team Robot2019-08-200-0/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qt-qpr1-release Change-Id: I6dd511f8f1ae6cbed7d58eec9f18f3173c78083b
| * | | | | | | [automerger skipped] Import translations. DO NOT MERGEBill Yi2019-08-190-0/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: d1c80691c8 -s ours am skip reason: subject contains skip directive Change-Id: I79acd40f5aa64928606ee670f7fec8acd266a081
| | * | | | | | Import translations. DO NOT MERGEBill Yi2019-08-182-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Auto-generated-cl: translation import Bug: 64712476 Change-Id: I12a0df0f505ee15fd25ed552c52365ffd2996707
* | | | | | | | Snap for 5811135 from 158d1fa8a1d2017e778819082e50b424785dd145 to ↵android-build-team Robot2019-08-176-44/+219
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qt-qpr1-release Change-Id: I481fa45ab7cc083a8e118e90754af5d0b24a80b2
| * | | | | | | Ensure files get mediascanned after the download is completed.Sudheer Shanka2019-08-156-44/+219
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: b02bbf988e Change-Id: I8d37b11fb060996eb1d85528c4341d3c0eaed169
| | * | | | | | Ensure files get mediascanned after the download is completed.Sudheer Shanka2019-08-136-44/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update file size in MediaStore to 0 before triggering mediascan which should force MediaScanner to scan this file. Also, add a clean-up job to trigger mediscan on already existing downloads which should have been mediascanned but haven't and got stuck in this state. Bug: 138419471 Test: manual Test: atest DownloadProviderTests Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java Test: atest DownloadManagerLegacy Test: atest DownloadManagerApi28 Change-Id: I813086ceba6c70ca42309fcce5f9db209eac1575 (cherry picked from commit c2b0739b08e423e3c9fcde42b095cd72315ecf1f)
* | | | | | | | Snap for 5778794 from 454cf9bf59c12f370e2c7bd6cebec417fa0b7a9f to ↵android-build-team Robot2019-08-032-0/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qt-qpr1-release Change-Id: I6a717ec2b7bad082350e9eeb07e042e9e48ce76f
| * | | | | | | Merge "Trigger mediascan after a download is completed." into qt-dev am: ↵bsears2019-07-312-0/+11
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 14a5b9171a am: 9541cdbd3b Change-Id: Ic9211bedb452bb60706ce76734bbdcdc4c7b639f
| | * | | | | | Merge "Trigger mediascan after a download is completed." into qt-devbsears2019-07-312-0/+11
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 14a5b9171a Change-Id: I11529f1ff938fb8c726aa7da2f9b1c4e4990182f
| | | * | | | | Merge "Trigger mediascan after a download is completed." into qt-devbsears2019-08-012-0/+11
| | | |\ \ \ \ \
| | | | * | | | | Trigger mediascan after a download is completed.Sudheer Shanka2019-07-312-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a media item is inserted, media_type will be automatically updated but some of the other media attributes will only be updated after a media scan. Bug: 138419471 Test: manual Test: atest DownloadProviderTests Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java Test: atest cts/tests/app/DownloadManagerLegacyTest/src/android/app/cts/DownloadManagerLegacyTest.java Test: atest cts/tests/app/DownloadManagerApi28Test/src/android/app/cts/DownloadManagerApi28Test.java Change-Id: If8192b31fb7da37425480e7afa53dd1304533b76
* | | | | | | | | Snap for 5760827 from d799e0fe6c402d03160322977fdc3059a312d8ab to ↵android-build-team Robot2019-07-270-0/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qt-qpr1-release Change-Id: I7ae9c33597310aef1d60557d784148e2a4472b54
| * | | | | | | | [automerger skipped] Import translations. DO NOT MERGEBill Yi2019-07-240-0/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 61f1c5a1ba -s ours am skip reason: subject contains skip directive Change-Id: Ibfc8a581b1c1e12c9335eb485a888fea6f127c18
| | * | | | | | | Import translations. DO NOT MERGEBill Yi2019-07-241-2/+2
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Auto-generated-cl: translation import Bug: 64712476 Change-Id: Ifcf4d278763f447d7cb5adb0fc6c4cb33110c3f0
* | | | | | | | Snap for 5730547 from 49ffd31dc3ab329e1b06d4f64fc824ca136c37f6 to ↵android-build-team Robot2019-07-165-40/+40
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qt-qpr1-release Change-Id: Ibd3603b58ca93b29c68ebd4a3a97a7b1599dc6c3
| * | | | | | | Import translations. DO NOT MERGEBill Yi2019-07-145-40/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Auto-generated-cl: translation import Bug: 64712476 Change-Id: Ie766048fd98383e9815d408aad6e9ba4a59841cd
* | | | | | | | Snap for 5713042 from bfec3085e848dbf3c08a33b5ca640a67f2625a0f to ↵android-build-team Robot2019-07-092-1/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qt-qpr1-release Change-Id: I6ebfe4503f7717b572581bd8555c5964d65dd86b
| * | | | | | | Set FGS priority for download jobs with visible notifications.Sudheer Shanka2019-07-082-1/+2
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: bb4439869f Change-Id: I82e9cbed762f2e8917cbef6009d9d7653e88ae9a
| | * | | | | | Set FGS priority for download jobs with visible notifications.Sudheer Shanka2019-07-032-1/+2
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is what DownloadProvider used to do pre-Q using PRIORITY_FOREGROUND_APP but in Q, we added a new priority to denote FGS but DownloadProvider was still using PRIORITY_FOREGROUND_APP which is now considered a lower priority than FGS and some jobs are getting preempted unnecessarily. So, update DownloadProvider to mark download jobs with FGS priority instead of BFGS priority. This still has some issues but at least this will be kind of reverting DownloadProvider to its pre-Q behavior. Bug: 135982638 Test: manual - Go through DO provisioning a few times and check admin app can be successfully downloaded. Test: atest DownloadProviderTests Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java Test: atest cts/tests/app/DownloadManagerLegacyTest/src/android/app/cts/DownloadManagerLegacyTest.java Test: atest cts/tests/app/DownloadManagerApi28Test/src/android/app/cts/DownloadManagerApi28Test.java Change-Id: I020e366845d768da271b860a7ace91318e67d8ae
* | | | | | | Snap for 5691478 from 2071933e6a25d5dbaa3b85a6bf0c79211373be6b to ↵android-build-team Robot2019-06-270-0/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qt-qpr1-release Change-Id: Iaea4847920c2a970882d5066aee2c8814c6957d9
| * | | | | | [automerger skipped] Import translations. DO NOT MERGEBill Yi2019-06-250-0/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: f52b0bd3df -s ours am skip reason: subject contains skip directive Change-Id: Ieddf3ab5f63f6572eb23858a98f054e46753bf0e
| | * | | | | Import translations. DO NOT MERGEBill Yi2019-06-253-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Auto-generated-cl: translation import Bug: 64712476 Change-Id: Ide5c53d86bdaa894b17f6820fa3ebf7dc34db424
* | | | | | | Snap for 5688259 from ee2be9caaaabc99e4fdba272168b166c4ea9a9fa to ↵android-build-team Robot2019-06-263-5/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qt-qpr1-release Change-Id: I7751ca2dc1198ac5e7cffc5f7420092f855d7a0f
| * | | | | | Import translations. DO NOT MERGEBill Yi2019-06-253-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Auto-generated-cl: translation import Bug: 64712476 Change-Id: Ice58e55ddb5d458c12c7c2d43975cfdb74239aa6
* | | | | | | Snap for 5671249 from 6f5e17445781694a22ad63b5b9d840796c9cf431 to ↵android-build-team Robot2019-06-196-1/+34
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qt-qpr1-release Change-Id: I8886bdb3405620bf489e74fca4a5cad96995958f