[
https://issues.apache.org/jira/browse/CB-12593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16399187#comment-16399187
]
ASF GitHub Bot commented on CB-12593:
-------------------------------------
infil00p closed pull request #275: CB-12593: (android) Fix potential
FileProvider conflicts
URL: https://github.com/apache/cordova-plugin-camera/pull/275
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/plugin.xml b/plugin.xml
index c666ed26..607f03ee 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -71,13 +71,13 @@
</config-file>
<config-file target="AndroidManifest.xml" parent="application">
<provider
- android:name="android.support.v4.content.FileProvider"
+ android:name="org.apache.cordova.camera.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true" >
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
- android:resource="@xml/provider_paths"/>
+ android:resource="@xml/camera_provider_paths"/>
</provider>
</config-file>
@@ -85,7 +85,8 @@
<source-file src="src/android/CordovaUri.java"
target-dir="src/org/apache/cordova/camera" />
<source-file src="src/android/FileHelper.java"
target-dir="src/org/apache/cordova/camera" />
<source-file src="src/android/ExifHelper.java"
target-dir="src/org/apache/cordova/camera" />
- <source-file src="src/android/xml/provider_paths.xml"
target-dir="res/xml" />
+ <source-file src="src/android/FileProvider.java"
target-dir="src/org/apache/cordova/camera" />
+ <source-file src="src/android/xml/camera_provider_paths.xml"
target-dir="res/xml" />
<js-module src="www/CameraPopoverHandle.js" name="CameraPopoverHandle">
<clobbers target="CameraPopoverHandle" />
diff --git a/src/android/FileProvider.java b/src/android/FileProvider.java
new file mode 100644
index 00000000..336f93ce
--- /dev/null
+++ b/src/android/FileProvider.java
@@ -0,0 +1,21 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+*/
+package org.apache.cordova.camera;
+
+public class FileProvider extends android.support.v4.content.FileProvider {}
diff --git a/src/android/xml/provider_paths.xml
b/src/android/xml/camera_provider_paths.xml
similarity index 100%
rename from src/android/xml/provider_paths.xml
rename to src/android/xml/camera_provider_paths.xml
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> FileProvider conflict in the camera plugin
> ------------------------------------------
>
> Key: CB-12593
> URL: https://issues.apache.org/jira/browse/CB-12593
> Project: Apache Cordova
> Issue Type: Bug
> Components: cordova-plugin-camera
> Reporter: Connor Pearson
> Priority: Major
> Labels: android-next
>
> Version 2.3.1 of the camera plugin adds a FileProvider to the
> AndroidManifest. I already have a plugin that is doing this, so the duplicate
> entries cause a build error.
> {code}
> Element provider#android.support.v4.content.FileProvider at
> AndroidManifest.xml:19:9-21:20 duplicated with element declared at
> AndroidManifest.xml:16:9-18:20
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]