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

Commit 3d2c2d13 authored by Abhishek Aggarwal's avatar Abhishek Aggarwal
Browse files

Exclude Content from uris

With latest android while sharing screenshot it attaches content URI
in file which message app was thinking as so send address , hence ignore
content URI to fix the issue
parent 03355c08
Loading
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -18,8 +18,10 @@
 */
package com.moez.QKSMS.feature.compose

import android.content.ContentResolver
import android.content.Intent
import android.net.Uri
import androidx.core.net.toUri
import androidx.lifecycle.ViewModel
import com.google.android.mms.ContentType
import com.moez.QKSMS.injection.ViewModelKey
@@ -107,6 +109,10 @@ class ComposeActivityModule {
        if (data?.contains('%') == true) {
            return URLDecoder.decode(data, "UTF-8")
        }

        if (ContentResolver.SCHEME_CONTENT.equals(data?.toUri()?.scheme)) {
            return null
        }
        return data
    }