From dc53582a51a0482b21e262c57cc6343374f8e789 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 17 Jun 2022 09:40:58 +0200 Subject: [PATCH] add a backup dialog for redirecting to media management settings --- .../simplemobiletools/gallery/pro/extensions/Activity.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 c6e42e07e..6b094869a 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 @@ -148,7 +148,11 @@ fun BaseSimpleActivity.handleMediaManagementPrompt(callback: () -> Unit) { showErrorToast(e) val intent = Intent() intent.action = Settings.ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION - startActivity(intent) + try { + startActivity(intent) + } catch (e: Exception) { + ConfirmationDialog(this, "", R.string.media_management_manual, R.string.ok, 0, false) {} + } } } else { finish()