Fix content provider permissions conflict

This commit is contained in:
José Rebelo
2023-07-09 14:03:34 +01:00
parent 90616214f0
commit 7d12279b0d
2 changed files with 10 additions and 6 deletions

View File

@@ -6,7 +6,7 @@
android:description="@string/permissionReadCardsDescription"
android:icon="@drawable/ic_launcher_foreground"
android:label="@string/permissionReadCardsLabel"
android:name="me.hackerchick.catima.READ_CARDS"
android:name="${applicationId}.READ_CARDS"
android:protectionLevel="dangerous" />
<uses-sdk tools:overrideLibrary="com.google.zxing.client.android" />
@@ -166,7 +166,7 @@
android:name=".contentprovider.CardsContentProvider"
android:authorities="${applicationId}.contentprovider.cards"
android:exported="true"
android:readPermission="me.hackerchick.catima.READ_CARDS"/>
android:readPermission="${applicationId}.READ_CARDS"/>
<provider
android:name="androidx.core.content.FileProvider"

View File

@@ -4,9 +4,7 @@ Catima implements a [content provider](https://developer.android.com/guide/topic
Since runtime permissions are only available since Android 6.0 (API level 23), the content provider is disabled for older android versions in order to prevent unwanted access to the data.
## Authority
The authority for this content provider: `<package_name>.contentprovider.cards`
## Package Names
There are 3 release channels, with 2 possible package names:
@@ -16,11 +14,17 @@ There are 3 release channels, with 2 possible package names:
| F-Droid | me.hackerchick.catima |
| Debug Build | me.hackerchick.catima.debug |
The package names are required for the authority and permissions, as described below.
## Authority
The authority for this content provider: `<package_name>.contentprovider.cards`
## Permissions
The content provider requires the following permissions:
- `me.hackerchick.catima.READ_CARDS` - in order to access any of the URIs.
- `<package_name>.READ_CARDS` - in order to access any of the URIs.
## URIs