Commit 71aa19f6 authored by Xing Liu's avatar Xing Liu Committed by Commit Bot

Webview: Build DownloadCollectionBridge for Android webview.

Currently we didn't build DownloadCollectionBridge for webview.

Bug: 1135162
Change-Id: Id7a2cb3fa263281216304b1c519271c95b44ae37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2450721
Commit-Queue: Xing Liu <xingliu@chromium.org>
Reviewed-by: default avatarMin Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814010}
parent 9cf372c6
......@@ -108,6 +108,7 @@ if (is_android) {
deps = [
"//base:base_java",
"//components/download/internal/common:internal_java",
"//third_party/android_deps:androidx_annotation_annotation_java",
]
}
......
......@@ -15,3 +15,4 @@ https://android.googlesource.com/platform/cts/+/master/tests/tests/provider/src/
Local Modifications:
- Added logs
- Introduced some helper method.
- Add @TargetApi(Build.VERSION_CODES.Q).
......@@ -16,9 +16,11 @@
package org.chromium.third_party.android.provider;
import android.annotation.TargetApi;
import android.content.ContentValues;
import android.content.Context;
import android.net.Uri;
import android.os.Build;
import android.os.ParcelFileDescriptor;
import android.provider.MediaStore;
import android.provider.MediaStore.DownloadColumns;
......@@ -107,6 +109,7 @@ public class MediaStoreUtils {
*
* @see DownloadColumns#DOWNLOAD_URI
*/
@TargetApi(Build.VERSION_CODES.Q)
public void setDownloadUri(@Nullable Uri downloadUri) {
if (downloadUri == null) {
mInsertValues.remove(DownloadColumns.DOWNLOAD_URI);
......@@ -121,6 +124,7 @@ public class MediaStoreUtils {
*
* @see DownloadColumns#REFERER_URI
*/
@TargetApi(Build.VERSION_CODES.Q)
public void setRefererUri(@Nullable Uri refererUri) {
if (refererUri == null) {
mInsertValues.remove(DownloadColumns.REFERER_URI);
......@@ -221,6 +225,7 @@ public class MediaStoreUtils {
* @param values ContentValues to be set.
* @param isPending Whether the item is pending.
*/
@TargetApi(Build.VERSION_CODES.Q)
private static void setPendingContentValues(ContentValues values, boolean isPending)
throws Exception {
values.put(MediaColumns.IS_PENDING, isPending ? 1 : 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment