diff --git a/utils/src/main/java/com/grappim/hateitorrateit/utils/file/urimanager/FileUriManagerImpl.kt b/utils/src/main/java/com/grappim/hateitorrateit/utils/file/urimanager/FileUriManagerImpl.kt index 7202b167..45a1a8a4 100644 --- a/utils/src/main/java/com/grappim/hateitorrateit/utils/file/urimanager/FileUriManagerImpl.kt +++ b/utils/src/main/java/com/grappim/hateitorrateit/utils/file/urimanager/FileUriManagerImpl.kt @@ -1,7 +1,6 @@ package com.grappim.hateitorrateit.utils.file.urimanager import android.content.Context -import android.content.Intent import android.net.Uri import androidx.core.content.FileProvider import com.grappim.hateitorrateit.utils.HashUtils @@ -30,11 +29,6 @@ class FileUriManagerImpl @Inject constructor( folderName: String, isEdit: Boolean ): ImageData { - context.contentResolver.takePersistableUriPermission( - uri, - Intent.FLAG_GRANT_READ_URI_PERMISSION - ) - val folder = if (isEdit) { folderPathManager.getTempFolderName(folderName) } else { @@ -45,7 +39,7 @@ class FileUriManagerImpl @Inject constructor( val newFile = fileCreationUtils.createFileLocally(uri, folder) val newUri = getFileUri(newFile) val fileSize = fileInfoRetriever.getFileSize(newUri) - val mimeType = fileInfoRetriever.getMimeType(uri) + val mimeType = fileInfoRetriever.getMimeType(newUri) return ImageData( uri = newUri, name = newFile.name,