Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 258f0b05 authored by solokot's avatar solokot Committed by GitHub
Browse files

Merge pull request #21 from SimpleMobileTools/master

upd
parents 6691a8f8 6929b050
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ buildscript {
        propMinSdkVersion = 16
        propTargetSdkVersion = propCompileSdkVersion
        propVersionCode = 1
        propVersionName = '3.15.15'
        propVersionName = '3.16.1'
        kotlin_version = '1.2.30'
        support_libs = '27.1.0'
    }
+37 −37
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ class RenameItemDialog(val activity: BaseSimpleActivity, val path: String, val c
                                return@setOnClickListener
                            }

                    val newPath = "${path.getParentPath()}/$newName"
                            val newPath = "${path.getParentPath()}$newName"
                            if (activity.getDoesFilePathExist(newPath)) {
                                activity.toast(R.string.name_taken)
                                return@setOnClickListener
+4 −0
Original line number Diff line number Diff line
@@ -204,6 +204,10 @@ fun Context.getMediaContentUri(path: String): Uri? {
        else -> MediaStore.Files.getContentUri("external")
    }

    return getMediaContent(path, uri) ?: getMediaContent(path, MediaStore.Files.getContentUri("external")) ?: null
}

fun Context.getMediaContent(path: String, uri: Uri): Uri? {
    val projection = arrayOf(MediaStore.Images.Media._ID)
    val selection = MediaStore.Images.Media.DATA + "= ?"
    val selectionArgs = arrayOf(path)
+375 B (1006 B)
Loading image diff...
+167 B
Loading image diff...
Loading