mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-03-13 18:58:53 +01:00
Fix write file not working on Q after disabling scoped storage
This commit is contained in:
parent
c378bffaed
commit
2275da0170
1 changed files with 3 additions and 3 deletions
|
@ -68,15 +68,15 @@ interface MediaStoreUtil {
|
|||
context: Context, writer: (OutputStream) -> Unit, filename: String,
|
||||
subDir: String? = null
|
||||
): Uri {
|
||||
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
writeFileToDownload29(context, writer, filename, subDir)
|
||||
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
writeFileToDownload30(context, writer, filename, subDir)
|
||||
} else {
|
||||
writeFileToDownload0(context, writer, filename, subDir)
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.Q)
|
||||
private fun writeFileToDownload29(
|
||||
private fun writeFileToDownload30(
|
||||
context: Context, writer: (OutputStream) -> Unit, filename: String,
|
||||
subDir: String?
|
||||
): Uri {
|
||||
|
|
Loading…
Reference in a new issue