Commit 7498a828 authored by wanglei's avatar wanglei

...

parent df699c60
......@@ -52,7 +52,7 @@ object PdfBoxUtils {
}
fun checkPdfEncryption(filePath: String, uri: String? = null): Int {
fun checkPdfEncryption(filePath: String = "", uri: String? = null): Int {
var state = 0
try {
val pdfDocument = loadPDDocument(filePath, null, uri)
......
......@@ -69,7 +69,7 @@ class ToolFragment : BaseFragment<FragmentToolBinding>() {
val uri = it.data?.data ?: Uri.EMPTY
lifecycleScope.launch(Dispatchers.IO) {
val state = PdfBoxUtils.checkPdfEncryption(uri.toString())
val state = PdfBoxUtils.checkPdfEncryption(uri = uri.toString())
if (state == 0) {
launch(Dispatchers.Main) {
startActivity(Intent(requireContext(), PdfActivity::class.java).apply {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment