Better lifecycle management of main menu and splash screen

This commit is contained in:
Aaron Culliney 2015-09-13 10:42:06 -07:00
parent 902cdff495
commit 9c475b58eb

View File

@ -249,6 +249,9 @@ public class Apple2Activity extends Activity {
// TODO FIXME : need to test/fix other popups generated in other menus ... // TODO FIXME : need to test/fix other popups generated in other menus ...
dismissAllMenus(); dismissAllMenus();
mSplashScreen = null;
mMainMenu = null;
nativeOnPause(true); nativeOnPause(true);
} }
@ -447,9 +450,10 @@ public class Apple2Activity extends Activity {
} }
public synchronized void showSplashScreen() { public synchronized void showSplashScreen() {
if (mSplashScreen == null) { if (mSplashScreen != null) {
mSplashScreen = new Apple2SplashScreen(Apple2Activity.this); return;
} }
mSplashScreen = new Apple2SplashScreen(Apple2Activity.this);
runOnUiThread(new Runnable() { runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {