use the DocumentFile getFileInputStreamSync only at OTG files

This commit is contained in:
tibbi 2020-01-28 18:44:43 +01:00
parent 28183943cb
commit fd4589cb66
2 changed files with 2 additions and 2 deletions

View file

@ -7,7 +7,7 @@ buildscript {
propMinSdkVersion = 21
propTargetSdkVersion = propCompileSdkVersion
propVersionCode = 1
propVersionName = '5.21.27'
propVersionName = '5.21.28'
kotlin_version = '1.3.61'
}

View file

@ -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 {