From eb605bf75bd1019659d88ba52c7ad9c161a69974 Mon Sep 17 00:00:00 2001 From: ThomasSession Date: Wed, 21 Aug 2024 10:07:18 +1000 Subject: [PATCH] Using open documents so that the downloads can be accessed --- .../thoughtcrime/securesms/avatar/AvatarSelection.kt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/avatar/AvatarSelection.kt b/app/src/main/java/org/thoughtcrime/securesms/avatar/AvatarSelection.kt index adf4b0927c..ddf7ac5c77 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/avatar/AvatarSelection.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/avatar/AvatarSelection.kt @@ -18,7 +18,6 @@ import org.session.libsignal.utilities.ExternalStorageUtil.getImageDir import org.session.libsignal.utilities.Log import org.session.libsignal.utilities.NoExternalStorageException import org.thoughtcrime.securesms.util.FileProviderUtil -import org.thoughtcrime.securesms.util.IntentUtils import java.io.File import java.io.IOException import java.util.LinkedList @@ -104,13 +103,8 @@ class AvatarSelection( includeClear: Boolean ): Intent { val extraIntents: MutableList = LinkedList() - var galleryIntent = Intent(Intent.ACTION_PICK) - galleryIntent.setDataAndType(MediaStore.Images.Media.INTERNAL_CONTENT_URI, "image/*") - - if (!IntentUtils.isResolvable(context, galleryIntent)) { - galleryIntent = Intent(Intent.ACTION_GET_CONTENT) - galleryIntent.setType("image/*") - } + val galleryIntent = Intent(Intent.ACTION_OPEN_DOCUMENT) + galleryIntent.setType("image/*") if (tempCaptureFile != null) { val uri = FileProviderUtil.getUriFor(context, tempCaptureFile)