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

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

Merge pull request #39 from SimpleMobileTools/master

upd
parents e3ca59bf 4cce2273
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ buildscript {
        propMinSdkVersion = 16
        propTargetSdkVersion = propCompileSdkVersion
        propVersionCode = 1
        propVersionName = '4.5.3'
        propVersionName = '4.5.10'
        kotlin_version = '1.2.51'
        support_libs = '27.1.1'
    }
+2 −1
Original line number Diff line number Diff line
@@ -68,6 +68,7 @@ class LicenseActivity : BaseSimpleActivity() {
            License(LICENSE_NUMBER_PICKER, R.string.number_picker_title, R.string.number_picker_text, R.string.number_picker_url),
            License(LICENSE_EXOPLAYER, R.string.exoplayer_title, R.string.exoplayer_text, R.string.exoplayer_url),
            License(LICENSE_PANORAMA_VIEW, R.string.panorama_view_title, R.string.panorama_view_text, R.string.panorama_view_url),
            License(LICENSE_SANSELAN, R.string.sanselan_title, R.string.sanselan_text, R.string.sanselan_url)
            License(LICENSE_SANSELAN, R.string.sanselan_title, R.string.sanselan_text, R.string.sanselan_url),
            License(LICENSE_FILTERS, R.string.filters_title, R.string.filters_text, R.string.filters_url)
    )
}
+14 −1
Original line number Diff line number Diff line
@@ -671,7 +671,16 @@ fun BaseSimpleActivity.getFileOutputStreamSync(path: String, mimeType: String, p
    val targetFile = File(path)

    return if (needsStupidWritePermissions(path)) {
        val documentFile = parentDocumentFile ?: getDocumentFile(path.getParentPath())
        var documentFile = parentDocumentFile
        if (documentFile == null) {
            if (targetFile.parentFile.exists()) {
                documentFile = getDocumentFile(targetFile.parentFile.absolutePath)
            } else {
                documentFile = getDocumentFile(targetFile.parentFile.parent)
                documentFile = documentFile!!.createDirectory(targetFile.parentFile.name)
            }
        }

        if (documentFile == null) {
            val error = String.format(getString(R.string.could_not_create_file), targetFile.parent)
            showErrorToast(error)
@@ -681,6 +690,10 @@ fun BaseSimpleActivity.getFileOutputStreamSync(path: String, mimeType: String, p
        val newDocument = documentFile.createFile(mimeType, path.getFilenameFromPath())
        applicationContext.contentResolver.openOutputStream(newDocument!!.uri)
    } else {
        if (!targetFile.parentFile.exists()) {
            targetFile.parentFile.mkdirs()
        }

        try {
            FileOutputStream(targetFile)
        } catch (e: Exception) {
+1 −0
Original line number Diff line number Diff line
@@ -117,6 +117,7 @@ const val LICENSE_NUMBER_PICKER = 524288
const val LICENSE_EXOPLAYER = 1048576
const val LICENSE_PANORAMA_VIEW = 2097152
const val LICENSE_SANSELAN = 4194304
const val LICENSE_FILTERS = 8388608

// global intents
const val OPEN_DOCUMENT_TREE = 1000
+3 −0
Original line number Diff line number Diff line
@@ -501,6 +501,8 @@
    </string>
    <string name="purchase">Purchase</string>
    <string name="update_thank_you">Please update Simple Thank You to the latest version</string>
    <string name="before_asking_question_read_faq">Before you ask a question, please read the Frequently Asked Questions first, maybe the solution is there.</string>
    <string name="read_it">Read it</string>

    <!-- New app (do not translate anything on the 4th line) -->
    <string name="new_app">
@@ -555,4 +557,5 @@
    <string name="exoplayer_title">ExoPlayer (video player)</string>
    <string name="panorama_view_title">VR Panorama View (displaying panoramas)</string>
    <string name="sanselan_title">Apache Sanselan (reading image metadata)</string>
    <string name="filters_title">Android Photo Filters (image filters)</string>
</resources>
Loading