contentProvider

pull/302/head
gedoor 4 years ago
parent 8beeea869d
commit 323731d72e
  1. 12
      app/src/main/java/io/legado/app/api/ReaderProvider.kt

@ -28,12 +28,11 @@ class ReaderProvider : ContentProvider() {
}
private val postBodyKey = "json"
private val authority by lazy {
"${context?.applicationInfo?.packageName}.ReaderProvider"
}
private val sMatcher = UriMatcher(UriMatcher.NO_MATCH)
init {
override fun onCreate(): Boolean {
val authority = "${context?.applicationInfo?.packageName}.ReaderProvider"
print(authority)
sMatcher.addURI(
authority,
"source/insert",
@ -79,6 +78,7 @@ class ReaderProvider : ContentProvider() {
"book/content/query",
RequestCode.getBookContent.ordinal
)
return false
}
override fun delete(
@ -119,10 +119,6 @@ class ReaderProvider : ContentProvider() {
return null
}
override fun onCreate(): Boolean {
return false
}
override fun query(
uri: Uri, projection: Array<String>?, selection: String?,
selectionArgs: Array<String>?, sortOrder: String?

Loading…
Cancel
Save