|
|
@ -23,7 +23,10 @@ class FilePickerActivity : |
|
|
|
|
|
|
|
|
|
|
|
private val selectDocTree = |
|
|
|
private val selectDocTree = |
|
|
|
registerForActivityResult(ActivityResultContracts.OpenDocumentTree()) { |
|
|
|
registerForActivityResult(ActivityResultContracts.OpenDocumentTree()) { |
|
|
|
it ?: return@registerForActivityResult |
|
|
|
it ?: let { |
|
|
|
|
|
|
|
finish() |
|
|
|
|
|
|
|
return@registerForActivityResult |
|
|
|
|
|
|
|
} |
|
|
|
if (it.isContentScheme()) { |
|
|
|
if (it.isContentScheme()) { |
|
|
|
contentResolver.takePersistableUriPermission( |
|
|
|
contentResolver.takePersistableUriPermission( |
|
|
|
it, |
|
|
|
it, |
|
|
|