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: Add Androidx splash screen to wait for directory initialization #10948

Merged
merged 2 commits into from Aug 11, 2022

Conversation

t895
Copy link
Contributor

@t895 t895 commented Aug 5, 2022

This shows a blank splash screen while Dolphin initializes its configuration system.

Light
light

Dark
dark

@t895 t895 changed the title Android: Add Androidx splash screen to delay directory initialization Android: Add Androidx splash screen to wait for directory initialization Aug 5, 2022
@JosJuice
Copy link
Member

JosJuice commented Aug 5, 2022

Please ensure that this works under the following situations:

  • When scoped storage is not active and we ask the user for permission to access storage before running directory initialization. (That is, when DirectoryInitialization.shouldStart returns false.)
  • When using an Android TV launcher (which launches TvMainActivity).

Copy link
Member

@JosJuice JosJuice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We talked about the two points above on IRC yesterday. It seems like this PR is not aiming to add a splash screen on Android TV for now, and the PR has now been amended to address the situation of asking for permission.

There was a new situation I thought of yesterday that I believe this PR currently doesn't handle correctly: The situation where Android evicts the app from memory and the user then returns to the app later, bypassing the splash screen activity.

@t895
Copy link
Contributor Author

t895 commented Aug 10, 2022

The splash screen now appears the same across all android versions. Turns out you could make the splash screen appear under API 31 by using windowSplashScreenAnimatedIcon and not android:windowSplashScreenAnimatedIcon...

But now I'm pretty happy with everything involved with the splash screen. Let me know if there's anything else I should look out for @JosJuice or we could go ahead with a merge.

@t895
Copy link
Contributor Author

t895 commented Aug 10, 2022

Oh, I also just discovered that the splash screen will not appear on devices below API 23. I'm not surprised... but I'm still ok with that.

@JosJuice
Copy link
Member

My remaining comments:

  • The line in the PR description saying "I'm primarily doing this to make Android: App redesign with multi-theme system #10725 compatible with our config system" isn't true anymore, right?
  • The commits need squashing.
  • It's a bit strange to have this only for MainActivity. It would be best to have it for all the activities. But if you only want to implement it for MainActivity, I guess not going all the way with it is no reason to block this from being merged.

@JosJuice JosJuice merged commit ce08de8 into dolphin-emu:master Aug 11, 2022
11 checks passed
@t895 t895 deleted the splash branch September 11, 2022 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants