Android: Force quit app if external storage isn't mounted #10980
+50
−127
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
In the past, directory initialization could fail for two reasons: The user was rejecting the storage permission, or external storage wasn't mounted. With the introduction of scoped storage, the first of these two couldn't happen anymore; if the user rejects the storage permission, we just use the app-specific directory instead of the
dolphin-emudirectory.By making it so Dolphin force quits if external storage isn't mounted, we can get rid of our code for handling retrying directory initialization after it fails. I think this slight hit to UX is worth it considering that basically nobody has an Android device with detachable primary external storage anymore. And the UX hit is very small; the user just has to manually open the app again after remounting external storage. The toast about external storage not being mounted will still be displayed.
The recent merge of the splash screen PR may have made it so that the code for handling directory initialization failing doesn't work anymore. To be completely honest, I'm not sure how to even test this in 2022.