Skip to content

Commit 2e16d02

Browse files
committed
update target SDK to 26 and Commons
1 parent f8b2edb commit 2e16d02

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ apply plugin: 'kotlin-android'
33
apply plugin: 'kotlin-android-extensions'
44

55
android {
6-
compileSdkVersion 25
7-
buildToolsVersion "25.0.3"
6+
compileSdkVersion 26
7+
buildToolsVersion "26.0.2"
88

99
defaultConfig {
1010
applicationId "com.simplemobiletools.filemanager"
1111
minSdkVersion 16
12-
targetSdkVersion 23
12+
targetSdkVersion 26
1313
versionCode 36
1414
versionName "2.5.0"
1515
}
@@ -37,7 +37,7 @@ android {
3737
}
3838

3939
dependencies {
40-
compile 'com.simplemobiletools:commons:2.31.1'
40+
compile 'com.simplemobiletools:commons:2.33.1'
4141
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
4242
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
4343

app/src/main/kotlin/com/simplemobiletools/filemanager/activities/MainActivity.kt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ import android.view.Menu
1010
import android.view.MenuItem
1111
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
1212
import com.simplemobiletools.commons.extensions.*
13-
import com.simplemobiletools.commons.helpers.LICENSE_KOTLIN
14-
import com.simplemobiletools.commons.helpers.LICENSE_MULTISELECT
15-
import com.simplemobiletools.commons.helpers.LICENSE_PATTERN
16-
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE
13+
import com.simplemobiletools.commons.helpers.*
1714
import com.simplemobiletools.commons.models.RadioItem
1815
import com.simplemobiletools.commons.models.Release
1916
import com.simplemobiletools.filemanager.BuildConfig
@@ -195,7 +192,7 @@ class MainActivity : SimpleActivity() {
195192
}
196193

197194
private fun launchAbout() {
198-
startAboutActivity(R.string.app_name, LICENSE_KOTLIN or LICENSE_MULTISELECT or LICENSE_PATTERN, BuildConfig.VERSION_NAME)
195+
startAboutActivity(R.string.app_name, LICENSE_KOTLIN or LICENSE_MULTISELECT or LICENSE_GLIDE or LICENSE_PATTERN or LICENSE_REPRINT, BuildConfig.VERSION_NAME)
199196
}
200197

201198
override fun onBackPressed() {
@@ -227,7 +224,7 @@ class MainActivity : SimpleActivity() {
227224
fun pickedPath(path: String) {
228225
val resultIntent = Intent()
229226
val uri = Uri.fromFile(File(path))
230-
val type = File(path).getMimeType("image/jpeg")
227+
val type = path.getMimeTypeFromPath()
231228
resultIntent.setDataAndTypeAndNormalize(uri, type)
232229
resultIntent.flags = Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_GRANT_WRITE_URI_PERMISSION
233230
setResult(Activity.RESULT_OK, resultIntent)

0 commit comments

Comments
 (0)