Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: Force quit app if external storage isn't mounted #10980

Merged
merged 1 commit into from Aug 14, 2022

Conversation

JosJuice
Copy link
Member

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-emu directory.

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.

@JosJuice JosJuice requested a review from Ebola16 August 12, 2022 19:50
@JosJuice
Copy link
Member Author

JosJuice commented Aug 12, 2022

Ah oops, wrong button. Sorry!

(You are welcome to review this if you want to, Ebola16. I'm just not expecting you to, considering that you haven't been active for a while now)

@JosJuice JosJuice requested review from t895 and removed request for Ebola16 August 12, 2022 19:50
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-emu directory.

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.
@JosJuice JosJuice merged commit b6a18b0 into dolphin-emu:master Aug 14, 2022
11 checks passed
@JosJuice JosJuice deleted the android-no-dir-init-fail branch August 14, 2022 14:00
@chrisleigh-stack

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants