|
|
@ -230,6 +230,9 @@ object FilePicker { |
|
|
|
val intent = Intent(Intent.ACTION_GET_CONTENT) |
|
|
|
val intent = Intent(Intent.ACTION_GET_CONTENT) |
|
|
|
intent.addCategory(Intent.CATEGORY_OPENABLE) |
|
|
|
intent.addCategory(Intent.CATEGORY_OPENABLE) |
|
|
|
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION) |
|
|
|
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION) |
|
|
|
|
|
|
|
intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION) |
|
|
|
|
|
|
|
intent.addFlags(Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION) |
|
|
|
|
|
|
|
intent.addFlags(Intent.FLAG_GRANT_PREFIX_URI_PERMISSION) |
|
|
|
intent.type = "*/*" |
|
|
|
intent.type = "*/*" |
|
|
|
return intent |
|
|
|
return intent |
|
|
|
} |
|
|
|
} |
|
|
@ -237,6 +240,9 @@ object FilePicker { |
|
|
|
private fun createSelectDirIntent(): Intent { |
|
|
|
private fun createSelectDirIntent(): Intent { |
|
|
|
val intent = Intent(Intent.ACTION_OPEN_DOCUMENT_TREE) |
|
|
|
val intent = Intent(Intent.ACTION_OPEN_DOCUMENT_TREE) |
|
|
|
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION) |
|
|
|
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION) |
|
|
|
|
|
|
|
intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION) |
|
|
|
|
|
|
|
intent.addFlags(Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION) |
|
|
|
|
|
|
|
intent.addFlags(Intent.FLAG_GRANT_PREFIX_URI_PERMISSION) |
|
|
|
return intent |
|
|
|
return intent |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|