mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-14 03:30:53 +00:00
Losing trust with implementation(s) of Apple2MenuView.isShowing()
- This changes the behavior to rely on non-null status as proxy for showing - TODO : investigate why isShowing() appears to be a race/bogus
This commit is contained in:
parent
997461318f
commit
844d8b815b
@ -492,20 +492,16 @@ public class Apple2Activity extends Activity {
|
||||
});
|
||||
}
|
||||
|
||||
private void showSplashScreen() {
|
||||
private synchronized void showSplashScreen() {
|
||||
if (mSplashScreen != null) {
|
||||
return;
|
||||
}
|
||||
mSplashScreen = new Apple2SplashScreen(Apple2Activity.this);
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
synchronized (Apple2Activity.this) {
|
||||
if (mSplashScreen == null) {
|
||||
mSplashScreen = new Apple2SplashScreen(Apple2Activity.this);
|
||||
}
|
||||
if (mSplashScreen.isShowing()) {
|
||||
return;
|
||||
}
|
||||
mSplashScreen.show();
|
||||
Apple2CrashHandler.getInstance().checkForCrashes(Apple2Activity.this);
|
||||
}
|
||||
mSplashScreen.show();
|
||||
Apple2CrashHandler.getInstance().checkForCrashes(Apple2Activity.this);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -589,6 +585,9 @@ public class Apple2Activity extends Activity {
|
||||
if (menuView.isShown()) {
|
||||
((ViewGroup) menuView.getParent()).removeView(menuView);
|
||||
}
|
||||
if (apple2MenuView == mSplashScreen) {
|
||||
mSplashScreen = null;
|
||||
}
|
||||
}
|
||||
|
||||
// if no more views on menu stack, resume emulation
|
||||
|
Loading…
x
Reference in New Issue
Block a user