diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt index afa1c9d59..7fdd94368 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt @@ -190,9 +190,18 @@ class SettingsActivity : SimpleActivity() { ) private fun setupManageIncludedFolders() { - settings_manage_included_folders_holder.beGoneIf(isRPlus() && !isExternalStorageManager()) + if (isRPlus() && !isExternalStorageManager()) { + settings_manage_included_folders.text = "${getString(R.string.manage_included_folders)} (${getString(R.string.no_permission)})" + } else { + settings_manage_included_folders.setText(R.string.manage_included_folders) + } + settings_manage_included_folders_holder.setOnClickListener { - startActivity(Intent(this, IncludedFoldersActivity::class.java)) + if (isRPlus() && !isExternalStorageManager()) { + GrantAllFilesDialog(this) + } else { + startActivity(Intent(this, IncludedFoldersActivity::class.java)) + } } } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/GrantAllFilesDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/GrantAllFilesDialog.kt index b6df18e28..226bf5d2d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/GrantAllFilesDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/GrantAllFilesDialog.kt @@ -19,7 +19,7 @@ class GrantAllFilesDialog(val activity: BaseSimpleActivity) { .setPositiveButton(R.string.ok) { dialog, which -> activity.launchGrantAllFilesIntent() } .setNegativeButton(R.string.cancel, null) .apply { - activity.setupDialogStuff(view, this, cancelOnTouchOutside = false) { alertDialog -> } + activity.setupDialogStuff(view, this) { alertDialog -> } } } }