make sure OTG files pass through needsStupidWritePermissions and handleSAFDialog checks
This commit is contained in:
parent
b384d1854d
commit
460c33f9b1
3 changed files with 3 additions and 3 deletions
|
@ -6,7 +6,7 @@ buildscript {
|
|||
propMinSdkVersion = 16
|
||||
propTargetSdkVersion = propCompileSdkVersion
|
||||
propVersionCode = 1
|
||||
propVersionName = '3.11.36'
|
||||
propVersionName = '3.11.37'
|
||||
kotlin_version = '1.2.21'
|
||||
support_libs = '27.0.2'
|
||||
}
|
||||
|
|
|
@ -167,7 +167,7 @@ open class BaseSimpleActivity : AppCompatActivity() {
|
|||
fun startCustomizationActivity() = startActivity(Intent(this, CustomizationActivity::class.java))
|
||||
|
||||
fun handleSAFDialog(path: String, callback: () -> Unit): Boolean {
|
||||
return if (isShowingSAFDialog(path, baseConfig.treeUri, OPEN_DOCUMENT_TREE)) {
|
||||
return if (!isPathOnOTG(path) && isShowingSAFDialog(path, baseConfig.treeUri, OPEN_DOCUMENT_TREE)) {
|
||||
funAfterSAFPermission = callback
|
||||
true
|
||||
} else {
|
||||
|
|
|
@ -111,7 +111,7 @@ fun Context.isPathOnOTG(path: String) = path.startsWith(OTG_PATH)
|
|||
|
||||
fun Context.isFileDirItemOnOTG(fileDirItem: FileDirItem) = fileDirItem.path.startsWith(OTG_PATH)
|
||||
|
||||
fun Context.needsStupidWritePermissions(path: String) = isPathOnSD(path) && isLollipopPlus()
|
||||
fun Context.needsStupidWritePermissions(path: String) = (isPathOnSD(path) || isPathOnOTG(path)) && isLollipopPlus()
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
fun Context.hasProperStoredTreeUri(): Boolean {
|
||||
|
|
Loading…
Reference in a new issue