summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Import translations. DO NOT MERGEBill Yi2019-12-281-1/+1
| | | | | Change-Id: I3eaddf4f8659c424a09240caf035551838fa22e9 Auto-generated-cl: translation import
* Import translations. DO NOT MERGEBill Yi2019-11-08168-5632/+5632
| | | | | Change-Id: Icbc1cea972b6606078c043346bc29352fea63642 Auto-generated-cl: translation import
* Import translations. DO NOT MERGEBill Yi2019-09-281-3/+3
| | | | | Change-Id: I8d0b7ebd57432da1082d53229d7ead23d39618df Auto-generated-cl: translation import
* [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
* | | | | | | Import translations. DO NOT MERGEBill Yi2019-09-032-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Auto-generated-cl: translation import Bug: 64712476 Change-Id: If4d6ab45c3d78ba95fa3e75642acfe64c81c0dd5
* | | | | | | [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
* | | | | | | 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)
* | | | | | | 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
* | | | | | | | [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
* | | | | | | Import translations. DO NOT MERGEBill Yi2019-07-145-40/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Auto-generated-cl: translation import Bug: 64712476 Change-Id: Ie766048fd98383e9815d408aad6e9ba4a59841cd
* | | | | | | 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
* | | | | | [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
* | | | | | Import translations. DO NOT MERGEBill Yi2019-06-253-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Auto-generated-cl: translation import Bug: 64712476 Change-Id: Ice58e55ddb5d458c12c7c2d43975cfdb74239aa6
* | | | | | Whitelist DownloadManager.ACTION_NOTIFICATION_CLICKED broadcast for ↵Michal Karpinski2019-06-186-1/+34
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | background activity starts am: 45bab8a520 Change-Id: I1ec75e310970b26cf6bf18249e79d2a743003d88
| * | | | | Whitelist DownloadManager.ACTION_NOTIFICATION_CLICKED broadcastMichal Karpinski2019-06-186-1/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for background activity starts When the DownloadManager download notification is clicked, that broadcast is sent to an app, and the app should be able to open activities from bg for its duration. Bug: 135515407 Test: com.android.providers.downloads.PublicApiFunctionalTest#testNotificationClickedBroadcast Test: manual Change-Id: Ic1691f5bda890ceb2938ac76f4ca2a4c7e7a1160
* | | | | | Merge "Delegate deletion of mediaprovider downloads to FileSystemProvider." ↵Sudheer Shanka2019-06-141-10/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into qt-dev am: c2dc83fb4c Change-Id: I811574ad96e5525ac76918efdff3293881f0404b
| * | | | | Merge "Delegate deletion of mediaprovider downloads to FileSystemProvider." ↵Sudheer Shanka2019-06-141-10/+2
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | into qt-dev
| | * | | | | Delegate deletion of mediaprovider downloads to FileSystemProvider.Sudheer Shanka2019-06-131-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using ContentResolver.delete() directly on MediaProvider doesn't work for uris corresponding to directories. For now, delegate this deletion to FileSystemProvider which will try deleting all entries regex-matching the file path. Bug: 135031305 Test: manual Change-Id: Iac18d0fd0be05758aaf2c03971d716592d96699b
* | | | | | | Merge "Import translations. DO NOT MERGE" into qt-r1-devTreeHugger Robot2019-06-149-10/+10
|\ \ \ \ \ \ \
| * | | | | | | Import translations. DO NOT MERGEBill Yi2019-06-139-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Auto-generated-cl: translation import Bug: 64712476 Change-Id: I016980d27b2f13f5a05ce5a7798b3911af0a342a
* | | | | | | | [automerger skipped] Import translations. DO NOT MERGE am: 00cced240d -s oursBill Yi2019-06-140-0/+0
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| / / / / / / | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | am: 1a7a0ecbc4 -s ours am skip reason: subject contains skip directive Change-Id: Iacb8a7ec806f53fdf2179313af7730f588bffa04
| * | | | | | [automerger skipped] Import translations. DO NOT MERGEBill Yi2019-06-140-0/+0
| |\ \ \ \ \ \ | | |/ / / / / | |/| / / / / | | |/ / / / | | | | | | | | | | | | | | | | | | am: 00cced240d -s ours am skip reason: subject contains skip directive Change-Id: I43d16ab9ca453633ff0aefd1b226c7b62a067052
| | * | | | Import translations. DO NOT MERGEBill Yi2019-06-1320-41/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Auto-generated-cl: translation import Bug: 64712476 Change-Id: I7e105e0b1484a04abdba3f72bcc140ff6f3480e3
* | | | | | [automerger skipped] Import translations. DO NOT MERGEBill Yi2019-06-090-0/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: f66042e2d0 -s ours am skip reason: subject contains skip directive Change-Id: Id37fe9bd3096a9c497126a6f7dbe869b1fe560d4
| * | | | | Import translations. DO NOT MERGEBill Yi2019-06-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Auto-generated-cl: translation import Bug: 64712476 Change-Id: Iee77bf7755e593379fa2b004d916fcb71aa9b3c0