guess the OTG path if selected at the storage picker

This commit is contained in:
tibbi 2019-02-15 23:40:10 +01:00
parent de95d04adb
commit e575a4efa4
2 changed files with 5 additions and 1 deletions

View file

@ -7,7 +7,7 @@ buildscript {
propMinSdkVersion = 21
propTargetSdkVersion = propCompileSdkVersion
propVersionCode = 1
propVersionName = '5.7.18'
propVersionName = '5.7.19'
kotlin_version = '1.3.21'
}

View file

@ -105,6 +105,10 @@ class StoragePickerDialog(val activity: BaseSimpleActivity, currPath: String, va
}
private fun otgPicked() {
activity.getStorageDirectories().firstOrNull { it.trimEnd('/') != activity.internalStoragePath && it.trimEnd('/') != activity.sdCardPath }?.apply {
activity.baseConfig.OTGPath = trimEnd('/')
}
mDialog.dismiss()
callback(activity.otgPath)
}