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: Rewrite Wii system updates in Kotlin #11494

Merged
merged 11 commits into from Mar 8, 2023

Conversation

t895
Copy link
Contributor

@t895 t895 commented Jan 26, 2023

This initially was an attempt at preserving the updater process during configuration changes through coroutines, but afaik that is not possible without changing how the backend works. There is currrently some kind of bug somewhere between the android ndk and our backend that causes a file rename to fail on any kind of configuration change. This includes dark theme toggling, screen size change, or orientation change. I don't currently have the knowledge to fix this bug and I'd prefer to leave it for later. I attempted to cancel and restart the updater during a configuration change, but the error is thrown before I can handle it (at least without handling the entire configuration change myself but that would become clunky).

For now, I have rewritten the android app side of the updater in Kotlin and using a coroutine. This ensures the scope is cancelled properly once the viewmodel is destroyed. I've chosen to remove the orientation lock and let the dialog handle the failure. I believe it's best that we avoid locking device features especially since this can be easily started again without lost progress.

This also includes changing the progress bar to an indeterminate one during the cancellation process.

@lioncash
Copy link
Member

lioncash commented Mar 7, 2023

Since this was opened in Jan, could this get a rebase just to make sure there's no conflicts with anything?

@t895
Copy link
Contributor Author

t895 commented Mar 7, 2023

Seems like everything is working fine

@lioncash lioncash merged commit f1e4b6a into dolphin-emu:master Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants