mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-09-29 08:55:06 +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,21 +492,17 @@ public class Apple2Activity extends Activity {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showSplashScreen() {
|
private synchronized void showSplashScreen() {
|
||||||
|
if (mSplashScreen != null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mSplashScreen = new Apple2SplashScreen(Apple2Activity.this);
|
||||||
runOnUiThread(new Runnable() {
|
runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
synchronized (Apple2Activity.this) {
|
|
||||||
if (mSplashScreen == null) {
|
|
||||||
mSplashScreen = new Apple2SplashScreen(Apple2Activity.this);
|
|
||||||
}
|
|
||||||
if (mSplashScreen.isShowing()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
mSplashScreen.show();
|
mSplashScreen.show();
|
||||||
Apple2CrashHandler.getInstance().checkForCrashes(Apple2Activity.this);
|
Apple2CrashHandler.getInstance().checkForCrashes(Apple2Activity.this);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -589,6 +585,9 @@ public class Apple2Activity extends Activity {
|
|||||||
if (menuView.isShown()) {
|
if (menuView.isShown()) {
|
||||||
((ViewGroup) menuView.getParent()).removeView(menuView);
|
((ViewGroup) menuView.getParent()).removeView(menuView);
|
||||||
}
|
}
|
||||||
|
if (apple2MenuView == mSplashScreen) {
|
||||||
|
mSplashScreen = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if no more views on menu stack, resume emulation
|
// if no more views on menu stack, resume emulation
|
||||||
|
Loading…
Reference in New Issue
Block a user