pull/306/head
gedoor 4 years ago
parent cd802bad50
commit 2c1e46074c
  1. 2
      app/src/main/AndroidManifest.xml
  2. 2
      app/src/main/java/io/legado/app/api/ReaderProvider.kt

@ -343,7 +343,7 @@
<!--对外API,外部访问需声明io.legado.READ_WRITE权限-->
<provider
android:name=".api.ReaderProvider"
android:authorities="${applicationId}.ReaderProvider"
android:authorities="${applicationId}.readerProvider"
android:readPermission="io.legado.READ_WRITE"
android:writePermission="io.legado.READ_WRITE"
android:enabled="true"

@ -30,7 +30,7 @@ class ReaderProvider : ContentProvider() {
private val postBodyKey = "json"
private val sMatcher by lazy {
val uriMatcher = UriMatcher(UriMatcher.NO_MATCH)
val authority = "${context?.applicationInfo?.packageName}.ReaderProvider"
val authority = "${context?.applicationInfo?.packageName}.readerProvider"
uriMatcher.addURI(authority, "source/insert", RequestCode.saveSource.ordinal)
uriMatcher.addURI(authority, "sources/insert", RequestCode.saveSources.ordinal)
uriMatcher.addURI(authority, "book/insert", RequestCode.saveBook.ordinal)

Loading…
Cancel
Save