diff --git a/app/src/main/java/io/legado/app/help/book/BookHelp.kt b/app/src/main/java/io/legado/app/help/book/BookHelp.kt index 3979c2117..918daedba 100644 --- a/app/src/main/java/io/legado/app/help/book/BookHelp.kt +++ b/app/src/main/java/io/legado/app/help/book/BookHelp.kt @@ -211,7 +211,7 @@ object BookHelp { return if (uri.isContentScheme()) { appCtx.contentResolver.openFileDescriptor(uri, "r") } else { - ParcelFileDescriptor.open(File(uri.path), ParcelFileDescriptor.MODE_READ_ONLY) + ParcelFileDescriptor.open(File(uri.path!!), ParcelFileDescriptor.MODE_READ_ONLY) } } diff --git a/app/src/main/java/io/legado/app/model/localBook/PdfFile.kt b/app/src/main/java/io/legado/app/model/localBook/PdfFile.kt index 029e977b0..6b44617dd 100644 --- a/app/src/main/java/io/legado/app/model/localBook/PdfFile.kt +++ b/app/src/main/java/io/legado/app/model/localBook/PdfFile.kt @@ -107,7 +107,7 @@ class PdfFile(var book: Book) { } } else { fileDescriptor = - ParcelFileDescriptor.open(File(uri.path), ParcelFileDescriptor.MODE_READ_ONLY) + ParcelFileDescriptor.open(File(uri.path!!), ParcelFileDescriptor.MODE_READ_ONLY) ?.also { pdfRenderer = PdfRenderer(it) } diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/ContentTextView.kt b/app/src/main/java/io/legado/app/ui/book/read/page/ContentTextView.kt index f33b1ff2e..46dc2dacd 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/ContentTextView.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/ContentTextView.kt @@ -308,6 +308,7 @@ class ContentTextView(context: Context, attrs: AttributeSet?) : View(context, at * 单击 * @return true:已处理, false:未处理 */ + @Suppress("UNUSED_ANONYMOUS_PARAMETER") fun click(x: Float, y: Float): Boolean { var handled = false touch(x, y) { _, textPos, textPage, textLine, column ->