diff --git a/Clover/app/build.gradle b/Clover/app/build.gradle
index 0259e908..201a6518 100644
--- a/Clover/app/build.gradle
+++ b/Clover/app/build.gradle
@@ -72,6 +72,9 @@ android {
defaultPublishConfig "default"
flavorDimensions "default"
productFlavors {
+ // NOTE: the file provider authority names append to the package name.
+ // When changing this also update the authority in the manifest files.
+
// The app name refers to the name as displayed on the launcher.
// the flavor name is appended to the name in the settings.
"default" {
diff --git a/Clover/app/src/default/AndroidManifest.xml b/Clover/app/src/default/AndroidManifest.xml
new file mode 100644
index 00000000..0b5bc286
--- /dev/null
+++ b/Clover/app/src/default/AndroidManifest.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Clover/app/src/dev/AndroidManifest.xml b/Clover/app/src/dev/AndroidManifest.xml
new file mode 100644
index 00000000..e4f437e2
--- /dev/null
+++ b/Clover/app/src/dev/AndroidManifest.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Clover/app/src/fdroid/AndroidManifest.xml b/Clover/app/src/fdroid/AndroidManifest.xml
new file mode 100644
index 00000000..0b5bc286
--- /dev/null
+++ b/Clover/app/src/fdroid/AndroidManifest.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Clover/app/src/main/AndroidManifest.xml b/Clover/app/src/main/AndroidManifest.xml
index df4253f1..b0ce7abb 100644
--- a/Clover/app/src/main/AndroidManifest.xml
+++ b/Clover/app/src/main/AndroidManifest.xml
@@ -95,17 +95,8 @@ along with this program. If not, see .
-
-
-
-
-
+
+
diff --git a/Clover/app/src/main/java/org/floens/chan/core/cache/FileCacheProvider.java b/Clover/app/src/main/java/org/floens/chan/core/cache/FileCacheProvider.java
index a9eed1b9..7e4cebf3 100644
--- a/Clover/app/src/main/java/org/floens/chan/core/cache/FileCacheProvider.java
+++ b/Clover/app/src/main/java/org/floens/chan/core/cache/FileCacheProvider.java
@@ -26,11 +26,15 @@ import org.floens.chan.utils.AndroidUtils;
import java.io.File;
public class FileCacheProvider {
- // Same as the one defined in the manifest.
- private static final String AUTHORITY = "org.floens.chan.fileprovider";
-
public static Uri getUriForFile(File file) {
Context applicationContext = AndroidUtils.getAppContext();
- return FileProvider.getUriForFile(applicationContext, AUTHORITY, file);
+ String authority = getAuthority(applicationContext);
+ return FileProvider.getUriForFile(applicationContext, authority, file);
+ }
+
+ private static String getAuthority(Context applicationContext) {
+ // NOTE: keep this in line with the name defined in the different manifests for the
+ // different flavors.
+ return applicationContext.getPackageName() + ".fileprovider";
}
}