dolphin icon indicating copy to clipboard operation
dolphin copied to clipboard

Android: Add Androidx splash screen to wait for directory initialization

Open t895 opened this issue 3 years ago • 2 comments

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

I'm primarily doing this to make #10725 compatible with our config system.

Light light

Dark dark

t895 avatar Aug 05 '22 00:08 t895

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).

JosJuice avatar Aug 05 '22 07:08 JosJuice

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 avatar Aug 10 '22 00:08 t895

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.

t895 avatar Aug 10 '22 15:08 t895

My remaining comments:

  • The line in the PR description saying "I'm primarily doing this to make https://github.com/dolphin-emu/dolphin/pull/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 avatar Aug 10 '22 19:08 JosJuice