fill the OTGPath when appropriate
This commit is contained in:
parent
237dd01e46
commit
8c4ff2f8e4
3 changed files with 3 additions and 1 deletions
|
@ -7,7 +7,7 @@ buildscript {
|
|||
propMinSdkVersion = 21
|
||||
propTargetSdkVersion = propCompileSdkVersion
|
||||
propVersionCode = 1
|
||||
propVersionName = '5.7.11'
|
||||
propVersionName = '5.7.12'
|
||||
kotlin_version = '1.3.21'
|
||||
}
|
||||
|
||||
|
|
|
@ -169,6 +169,7 @@ abstract class BaseSimpleActivity : AppCompatActivity() {
|
|||
}
|
||||
baseConfig.OTGTreeUri = resultData.dataString
|
||||
baseConfig.OTGPartition = baseConfig.OTGTreeUri.removeSuffix("%3A").substringAfterLast('/')
|
||||
baseConfig.OTGPath = "/storage${baseConfig.OTGPartition}"
|
||||
|
||||
funAfterOTGPermission?.invoke(true)
|
||||
funAfterOTGPermission = null
|
||||
|
|
|
@ -195,6 +195,7 @@ fun Context.getOTGFastDocumentFile(path: String): DocumentFile? {
|
|||
|
||||
if (baseConfig.OTGPartition.isEmpty()) {
|
||||
baseConfig.OTGPartition = baseConfig.OTGTreeUri.removeSuffix("%3A").substringAfterLast('/')
|
||||
baseConfig.OTGPath = "/storage${baseConfig.OTGPartition}"
|
||||
}
|
||||
|
||||
val relativePath = Uri.encode(path.substring(OTG_PATH.length).trim('/'))
|
||||
|
|
Loading…
Reference in a new issue