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