app: fix cover provider authority conflict
Between release and debug builds
This commit is contained in:
parent
6be97943bc
commit
3e54c032fe
4 changed files with 7 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="info_app_name" translatable="false">Auxio Debug</string>
|
||||
<string name="pkg_authority_cover">org.oxycblt.auxio.debug.image.CoverProvider</string>
|
||||
</resources>
|
|
@ -105,7 +105,7 @@
|
|||
-->
|
||||
<provider
|
||||
android:name=".image.CoverProvider"
|
||||
android:authorities="org.oxycblt.auxio.image.CoverProvider"
|
||||
android:authorities="@string/pkg_authority_cover"
|
||||
android:exported="true"
|
||||
tools:ignore="ExportedContentProvider" />
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ import android.database.Cursor
|
|||
import android.net.Uri
|
||||
import android.os.ParcelFileDescriptor
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.oxycblt.auxio.BuildConfig
|
||||
import org.oxycblt.auxio.image.covers.SiloedCoverId
|
||||
import org.oxycblt.auxio.image.covers.SiloedCovers
|
||||
import org.oxycblt.musikr.cover.ObtainResult
|
||||
|
@ -72,7 +73,7 @@ class CoverProvider : ContentProvider() {
|
|||
): Int = 0
|
||||
|
||||
companion object {
|
||||
private const val AUTHORITY = "org.oxycblt.auxio.image.CoverProvider"
|
||||
private const val AUTHORITY = "${BuildConfig.APPLICATION_ID}.image.CoverProvider"
|
||||
private const val IMAGES_PATH = "covers"
|
||||
private val uriMatcher =
|
||||
UriMatcher(UriMatcher.NO_MATCH).apply { addURI(AUTHORITY, "$IMAGES_PATH/*", 1) }
|
||||
|
|
|
@ -16,5 +16,8 @@
|
|||
<string name="cdc_wav">Microsoft WAVE</string>
|
||||
<string name="cnt_ogg">Ogg %s</string>
|
||||
|
||||
<!-- Pkg Namespace | Dynamic package names -->
|
||||
<string name="pkg_authority_cover">org.oxycblt.auxio.image.CoverProvider</string>
|
||||
|
||||
<!-- Supporter Namespace | Sponsor usernames -->
|
||||
</resources>
|
Loading…
Reference in a new issue