From 3adb07ac74aa8d5d2ee46dc71990c464b16e1bdc Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 8 May 2021 16:10:39 +0200 Subject: [PATCH] Android: Show a dialog for scoped storage incompatible settings The following settings are currently not SAF compatible, and might never be due to the performance impact: Dump Path Load Path Resource Pack Path Wii NAND Root This commit makes us show a message to the user if they try to change one of these settings while scoped storage is active. I don't want to entirely remove the settings from being listed in the settings activity, because it's important that the user is able to reset them if they were set to something custom in a previous version of Dolphin. --- .../features/settings/ui/SettingsAdapter.java | 13 ++++++++++++- Source/Android/app/src/main/res/values/strings.xml | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsAdapter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsAdapter.java index 753dddf522..a26be57754 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsAdapter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsAdapter.java @@ -44,6 +44,7 @@ import org.dolphinemu.dolphinemu.features.settings.ui.viewholder.SubmenuViewHold import org.dolphinemu.dolphinemu.utils.DirectoryInitialization; import org.dolphinemu.dolphinemu.utils.FileBrowserHelper; import org.dolphinemu.dolphinemu.utils.Log; +import org.dolphinemu.dolphinemu.utils.PermissionsHandler; import java.io.File; import java.io.IOException; @@ -300,7 +301,17 @@ public final class SettingsAdapter extends RecyclerView.Adapter dialog.dismiss()); + builder.show(); + } + else + { + FileBrowserHelper.openDirectoryPicker(mView.getActivity(), FileBrowserHelper.GAME_EXTENSIONS); + } } public void onFilePickerFileClick(SettingsItem item, int position) diff --git a/Source/Android/app/src/main/res/values/strings.xml b/Source/Android/app/src/main/res/values/strings.xml index 897aa639e5..6671023dea 100644 --- a/Source/Android/app/src/main/res/values/strings.xml +++ b/Source/Android/app/src/main/res/values/strings.xml @@ -481,6 +481,7 @@ It can efficiently compress both junk data and encrypted Wii data. Device rumble not found + Due to the Scoped Storage policy in Android 11 and newer, you can\'t change this path. Loading Settings... This setting can\'t be changed while a game is running. Long press a setting to clear it.