From 45a8ee0ec0b7db4a72a39c3af822f9df16b0244a Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 9 May 2022 10:46:43 +0200 Subject: [PATCH] do not show the Media Management prompt with All files permission --- .../com/simplemobiletools/gallery/pro/extensions/Activity.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt index d9779f999..4c34b733d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt @@ -15,10 +15,8 @@ import android.os.Build import android.provider.MediaStore import android.provider.MediaStore.Files import android.provider.MediaStore.Images -import android.provider.Settings import android.util.DisplayMetrics import android.view.View -import androidx.annotation.RequiresApi import androidx.appcompat.app.AppCompatActivity import androidx.exifinterface.media.ExifInterface import com.bumptech.glide.Glide @@ -128,9 +126,8 @@ fun SimpleActivity.launchAbout() { startAboutActivity(R.string.app_name, licenses, BuildConfig.VERSION_NAME, faqItems, true) } - fun BaseSimpleActivity.handleMediaManagementPrompt(callback: () -> Unit) { - if (isSPlus() && !MediaStore.canManageMedia(this)) { + if (isSPlus() && !MediaStore.canManageMedia(this) && !isExternalStorageManager()) { ConfirmationDialog(this, "", R.string.media_management_prompt, R.string.ok, 0) { launchMediaManagementIntent(callback) }