EN: Use applicationId as authority for export file provider

This commit is contained in:
Marvin W 2020-12-16 19:43:24 +01:00
parent 15609af676
commit 0e8c8bb712
No known key found for this signature in database
GPG Key ID: 072E9235DB996F2A
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@
<provider <provider
android:name="androidx.core.content.FileProvider" android:name="androidx.core.content.FileProvider"
android:authorities="org.microg.gms.nearby.exposurenotification.export" android:authorities="${applicationId}.microg.exposure.export"
android:grantUriPermissions="true" android:grantUriPermissions="true"
android:exported="false"> android:exported="false">
<meta-data <meta-data

View File

@ -994,7 +994,7 @@ class ExposureDatabase private constructor(private val context: Context) : SQLit
// Use the FileProvider to get a content URI for the new DB // Use the FileProvider to get a content URI for the new DB
val fileUri: Uri? = try { val fileUri: Uri? = try {
FileProvider.getUriForFile(context,"org.microg.gms.nearby.exposurenotification.export", exportFile) FileProvider.getUriForFile(context,"${context.packageName}.microg.exposure.export", exportFile)
} catch (e: IllegalArgumentException) { } catch (e: IllegalArgumentException) {
Log.e("EN-DB-Exporter", "The database file can't be shared: $exportFile $e") Log.e("EN-DB-Exporter", "The database file can't be shared: $exportFile $e")
null null