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

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

Merge pull request #46 from SimpleMobileTools/master

upd
parents e0672bc2 92b3a2b4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ buildscript {
        propMinSdkVersion = 21
        propTargetSdkVersion = propCompileSdkVersion
        propVersionCode = 1
        propVersionName = '5.2.9'
        propVersionName = '5.2.15'
        kotlin_version = '1.2.71'
    }

+9 −3
Original line number Diff line number Diff line
@@ -220,11 +220,17 @@ fun Context.getPermissionString(id: Int) = when (id) {
fun Context.getFilePublicUri(file: File, applicationId: String): Uri {
    // for images/videos/gifs try getting a media content uri first, like content://media/external/images/media/438
    // if media content uri is null, get our custom uri like content://com.simplemobiletools.gallery.provider/external_files/emulated/0/DCIM/IMG_20171104_233915.jpg
    return if (file.isMediaFile()) {
        getMediaContentUri(file.absolutePath) ?: FileProvider.getUriForFile(this, "$applicationId.provider", file)
    var uri = if (file.isMediaFile()) {
        getMediaContentUri(file.absolutePath)
    } else {
        FileProvider.getUriForFile(this, "$applicationId.provider", file)
        getMediaContent(file.absolutePath, MediaStore.Files.getContentUri("external"))
    }

    if (uri == null) {
        uri = FileProvider.getUriForFile(this, "$applicationId.provider", file)
    }

    return uri!!
}

fun Context.getMediaContentUri(path: String): Uri? {
+1 −0
Original line number Diff line number Diff line
@@ -270,6 +270,7 @@ fun String.highlightTextPart(textToHighlight: String, color: Int, highlightAll:
    return spannableString
}

// remove diacritics, for example č -> c
fun String.normalizeString() = Normalizer.normalize(this, Normalizer.Form.NFD).replace(normalizeRegex, "")

fun String.getMimeType(): String {
+2 −0
Original line number Diff line number Diff line
@@ -380,6 +380,7 @@
    <string name="extra_large">Extra large</string>
    <string name="password_protect_hidden_items">Password protect hidden item visibility</string>
    <string name="password_protect_whole_app">Password protect the whole application</string>
    <string name="password_protect_file_deletion">Password protect file deletion and moving</string>
    <string name="keep_last_modified">Keep old last-modified value at file copy/move/rename</string>
    <string name="show_info_bubble">Show an info bubble at scrolling items by scrollbar dragging</string>
    <string name="prevent_phone_from_sleeping">Prevent phone from sleeping while the app is in foreground</string>
@@ -414,6 +415,7 @@
    <string name="files_restored_successfully">Files have been restored successfully</string>
    <string name="empty_recycle_bin_confirmation">Are you sure you want to empty the Recycle Bin? The files will be permanently lost.</string>
    <string name="recycle_bin_empty">The Recycle Bin is empty</string>
    <string name="moving_recycle_bin_items_disabled">Moving Recycle bin items is disabled, please use Restore</string>

    <plurals name="moving_items_into_bin">
        <item quantity="one">Moving %d item into the Recycle Bin</item>
+2 −0
Original line number Diff line number Diff line
@@ -380,6 +380,7 @@
    <string name="extra_large">Çox böyük</string>
    <string name="password_protect_hidden_items">Şifrə gizlənmiş tətbiqin görünürlüyünü qoruyur</string>
    <string name="password_protect_whole_app">Şifrə bütün tətbiqi qoruyur</string>
    <string name="password_protect_file_deletion">Password protect file deletion and moving</string>
    <string name="keep_last_modified">Faylı kopyalama/daşıma/yenidən adlandırma proseslərində son faylı saxla</string>
    <string name="show_info_bubble">Sürüşdürmə çubuğu ilə hərəkət zamanı məlumat ekranını göstər</string>
    <string name="prevent_phone_from_sleeping">Tətbiq aktiv halda olduqda telefonun yuxuya getməsinin qarşısını al</string>
@@ -414,6 +415,7 @@
    <string name="files_restored_successfully">Fayllar uğurla geri qaytarıldı</string>
    <string name="empty_recycle_bin_confirmation">Zibil qutusunu boşaltmaq istədiyinizə əminsiniz? Fayllar tamamilə itiriləcək.</string>
    <string name="recycle_bin_empty">Zibil qutusu boşdur</string>
    <string name="moving_recycle_bin_items_disabled">Moving Recycle bin items is disabled, please use Restore</string>

    <plurals name="moving_items_into_bin">
        <item quantity="one">Moving %d item into the Recycle Bin</item>
Loading