[Android] Change file provide to prevent conflicts

Geoffrey Métais git at videolan.org
Fri Aug 3 17:57:15 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Aug  3 17:56:24 2018 +0200| [10dadd732ac0621c04a9f0756fda1a81109d3fa6] | committer: Geoffrey Métais

Change file provide to prevent conflicts

We cannot install release and debug build on the same device otherwise

> https://code.videolan.org/videolan/vlc-android/commit/10dadd732ac0621c04a9f0756fda1a81109d3fa6
---

 vlc-android/AndroidManifest.xml                                       | 4 ++--
 .../commontools => vlc-android/src/org/videolan/vlc}/FileProvider.kt  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/vlc-android/AndroidManifest.xml b/vlc-android/AndroidManifest.xml
index 17c571607..abf6ebfa9 100644
--- a/vlc-android/AndroidManifest.xml
+++ b/vlc-android/AndroidManifest.xml
@@ -611,8 +611,8 @@
         </receiver>
 
         <provider
-            android:authorities="org.videolan.vlc.thumbprovider"
-            android:name="videolan.org.commontools.FileProvider"
+            android:authorities="${applicationId}.thumbprovider"
+            android:name=".FileProvider"
             android:exported="true"
             android:grantUriPermissions="true">
         </provider>
diff --git a/tools/src/main/java/videolan/org/commontools/FileProvider.kt b/vlc-android/src/org/videolan/vlc/FileProvider.kt
similarity index 91%
rename from tools/src/main/java/videolan/org/commontools/FileProvider.kt
rename to vlc-android/src/org/videolan/vlc/FileProvider.kt
index 2fdf2c1eb..205566134 100644
--- a/tools/src/main/java/videolan/org/commontools/FileProvider.kt
+++ b/vlc-android/src/org/videolan/vlc/FileProvider.kt
@@ -1,4 +1,4 @@
-package videolan.org.commontools
+package org.videolan.vlc
 
 import android.content.ContentProvider
 import android.content.ContentValues
@@ -9,7 +9,7 @@ import java.io.File
 import java.io.FileNotFoundException
 
 private const val TAG = "VLC/FileProvider"
-const val THUMB_PROVIDER_AUTHORITY = "org.videolan.vlc.thumbprovider"
+private const val THUMB_PROVIDER_AUTHORITY = "${BuildConfig.APPLICATION_ID}.thumbprovider"
 
 class FileProvider : ContentProvider() {
     override fun insert(uri: Uri, values: ContentValues?) = Uri.EMPTY!!



More information about the Android mailing list