From 277b54ce32e518561a256f002487503942dfcb72 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 15 Feb 2019 12:44:55 +0100 Subject: [PATCH] try guessing the OTG path as soon as possible --- app/build.gradle | 2 +- .../simplemobiletools/gallery/pro/activities/MainActivity.kt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index eafe0dbca..cc61d37e6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -61,7 +61,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.7.9' + implementation 'com.simplemobiletools:commons:5.7.13' implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0' implementation 'androidx.multidex:multidex:2.0.1' implementation 'it.sephiroth.android.exif:library:1.0.1' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt index 38de24828..470db0f1b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt @@ -382,6 +382,9 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { } } config.wasOTGHandled = true + getStorageDirectories().firstOrNull { it.trimEnd('/') != internalStoragePath && it.trimEnd('/') != sdCardPath }?.apply { + config.OTGPath = trimEnd('/') + } } }.start() }