pull/977/head
gedoor 4 years ago
parent af769120da
commit 0fb04f1547
  1. 2
      app/src/main/java/io/legado/app/ui/document/FilePickerActivity.kt

@ -23,6 +23,7 @@ class FilePickerActivity :
private val selectDocTree =
registerForActivityResult(ActivityResultContracts.OpenDocumentTree()) {
it ?: return@registerForActivityResult
if (it.isContentScheme()) {
contentResolver.takePersistableUriPermission(
it,
@ -33,6 +34,7 @@ class FilePickerActivity :
}
private val selectDoc = registerForActivityResult(ActivityResultContracts.OpenDocument()) {
it ?: return@registerForActivityResult
onResult(Intent().setData(it))
}

Loading…
Cancel
Save