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

Commit e814f386 authored by tibbi's avatar tibbi
Browse files

improve the way mimetype is achieved from multiple uris

parent a51539ee
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 = '2.41.2'
        propVersionName = '2.41.4'
        kotlin_version = '1.1.60'
        support_libs = '27.0.1'
    }
+5 −1
Original line number Diff line number Diff line
@@ -125,9 +125,13 @@ fun Activity.shareUris(uris: ArrayList<Uri>, applicationId: String) {
        shareUri(uris.first(), applicationId)
    } else {
        val newUris = uris.map { ensurePublicUri(it, applicationId) } as ArrayList<Uri>
        var mimeType = newUris.getMimeType()
        if (mimeType.isEmpty() || mimeType == "*/*") {
            mimeType = uris.getMimeType()
        }
        Intent().apply {
            action = Intent.ACTION_SEND_MULTIPLE
            type = newUris.getMimeType()
            type = mimeType
            addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
            putParcelableArrayListExtra(Intent.EXTRA_STREAM, newUris)