Commit 65a3d0e7 authored by Clark DuVall's avatar Clark DuVall Committed by Commit Bot

[WebLayer] Fix FileProvider conflicts with client app

If the client app also has a default FileProvider, the build system will
try to merge both of them, which is not what we want. Using a unique
name for our file provider and file path resource fixes this.

Change-Id: I800efa70a2075a498839f64c303334f1f6c6261b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1887660
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710498}
parent 36cab7cc
......@@ -45,12 +45,12 @@
android:exported="false" />
{% endfor %}
<provider android:name="android.support.v4.content.FileProvider"
<provider android:name="org.chromium.weblayer.WebLayerFileProvider"
android:authorities="${applicationId}.org.chromium.weblayer.client.FileProvider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
android:resource="@xml/weblayer_file_paths" />
</provider>
</application>
</manifest>
......@@ -31,6 +31,7 @@ android_library("java") {
"org/chromium/weblayer/FullscreenDelegate.java",
"org/chromium/weblayer/ListenableFuture.java",
"org/chromium/weblayer/ListenableResult.java",
"org/chromium/weblayer/WebLayerFileProvider.java",
"org/chromium/weblayer/NavigationController.java",
"org/chromium/weblayer/Navigation.java",
"org/chromium/weblayer/NavigationObserver.java",
......@@ -46,6 +47,7 @@ android_library("java") {
":client_resources",
":weblayer_client_manifest",
"//third_party/android_deps:androidx_annotation_annotation_java",
"//third_party/android_deps:com_android_support_support_compat_java",
"//third_party/android_deps:com_android_support_support_fragment_java",
"//weblayer/browser/java:client_java",
]
......
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.weblayer;
import android.support.v4.content.FileProvider;
/**
* Subclass of FileProvider which prevents conflicts with the embedding application manifest.
*/
public final class WebLayerFileProvider extends FileProvider {}
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