use the DocumentFile getFileInputStreamSync only at OTG files
This commit is contained in:
parent
28183943cb
commit
fd4589cb66
2 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@ buildscript {
|
|||
propMinSdkVersion = 21
|
||||
propTargetSdkVersion = propCompileSdkVersion
|
||||
propVersionCode = 1
|
||||
propVersionName = '5.21.27'
|
||||
propVersionName = '5.21.28'
|
||||
kotlin_version = '1.3.61'
|
||||
}
|
||||
|
||||
|
|
|
@ -723,7 +723,7 @@ fun BaseSimpleActivity.getFileOutputStreamSync(path: String, mimeType: String, p
|
|||
}
|
||||
|
||||
fun BaseSimpleActivity.getFileInputStreamSync(path: String): InputStream? {
|
||||
return if (needsStupidWritePermissions(path)) {
|
||||
return if (isPathOnOTG(path)) {
|
||||
val fileDocument = getSomeDocumentFile(path)
|
||||
applicationContext.contentResolver.openInputStream(fileDocument?.uri!!)
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue