Add check for isExternalStorageManager
- if the app (like Simple FileManger), is an External Storage Manager, then there is no need to use SAF
This commit is contained in:
parent
46c5529ec7
commit
ad250836eb
1 changed files with 2 additions and 2 deletions
|
@ -164,13 +164,13 @@ fun Context.getSAFOnlyDirs(): List<String> {
|
|||
}
|
||||
|
||||
fun Context.isAccessibleWithSAFSdk30(path: String): Boolean {
|
||||
if(path.startsWith(filesDir.absolutePath)){
|
||||
if (path.startsWith(filesDir.absolutePath)) {
|
||||
return false
|
||||
}
|
||||
|
||||
val firstParentPath = path.getFirstParentPath(this)
|
||||
val firstParentDir = path.getFirstParentDirName(this)
|
||||
return isRPlus() && firstParentPath != path &&
|
||||
return isRPlus() && !Environment.isExternalStorageManager() && firstParentPath != path &&
|
||||
DIRS_INACCESSIBLE_WITH_SAF_SDK_30.all {
|
||||
firstParentDir != it
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue