When I launch my app, if there has been x failed attempts to get into the main game, I launch a "SafeMode activity", where they then have options to reset or delete save data etc, which I launch like this from my "Main" activity:
Intent intent = new Intent(MainActivity.this, SafeModeActivity.class);
startActivity(intent);
I have a button in there to exit safe mode and return to the main app, which then calls this (boolean set to false so we don't enter safe mode again):
MainActivity.mbEnterSafeMode = false;
finish();
This works fine except I get a black screen for around 15 seconds before anything displays on "Main". I've stepped through the code and OnRestart() and onStart() take virtually no time at all and if I break after this point, there is no call stack.
I've seen posts on this kind of thing but most seem to mention onCreate() taking a while but that has already been called in my case as I'm going back to the activity. Other people mention adding a "No Display" theme but I'm not sure how that helps me.
My question is what is happening after onStart() please?
Note that I also get this delay when Main is started normally but it doesn't matter as this is before anything has displayed but when returning from safe mode, something was displaying, then I get my black screen and then the title screen.
Thanks, Chris.