mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-02-11 01:30:29 +00:00
Fix synchronization for showing splash screen
This commit is contained in:
parent
3f934ecd3f
commit
23bfd24054
@ -41,7 +41,7 @@ public abstract class Apple2AbstractMenu implements Apple2MenuView {
|
||||
setup();
|
||||
}
|
||||
|
||||
public void show() {
|
||||
public synchronized void show() {
|
||||
if (isShowing()) {
|
||||
return;
|
||||
}
|
||||
|
@ -424,15 +424,12 @@ public class Apple2Activity extends Activity {
|
||||
}
|
||||
|
||||
public synchronized void showSplashScreen() {
|
||||
if (mSplashScreen != null && mSplashScreen.isShowing()) {
|
||||
return;
|
||||
if (mSplashScreen == null) {
|
||||
mSplashScreen = new Apple2SplashScreen(Apple2Activity.this);
|
||||
}
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (mSplashScreen == null) {
|
||||
mSplashScreen = new Apple2SplashScreen(Apple2Activity.this);
|
||||
}
|
||||
mSplashScreen.show();
|
||||
}
|
||||
});
|
||||
|
@ -61,7 +61,7 @@ public class Apple2SplashScreen implements Apple2MenuView {
|
||||
/* ... */
|
||||
}
|
||||
|
||||
public void show() {
|
||||
public synchronized void show() {
|
||||
if (isShowing()) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user