Commit 95eafe1c authored by fallenstardust's avatar fallenstardust

如果已经启动ygopro,不重新创建房间

parent 3608c86d
...@@ -155,10 +155,13 @@ public class YGOStarter { ...@@ -155,10 +155,13 @@ public class YGOStarter {
lasttime = System.currentTimeMillis(); lasttime = System.currentTimeMillis();
showLoadingBg(activity); showLoadingBg(activity);
if (!ComponentUtils.isActivityRunning(activity, new ComponentName(activity, YGOMobileActivity.class))) { if (!ComponentUtils.isActivityRunning(activity, new ComponentName(activity, YGOMobileActivity.class))) {
//random tips
String[] tipsList = activity.getResources().getStringArray(R.array.tips); String[] tipsList = activity.getResources().getStringArray(R.array.tips);
int x = (int) (Math.random() * tipsList.length); int x = (int) (Math.random() * tipsList.length);
String tips = tipsList[x]; String tips = tipsList[x];
Toast.makeText(activity, tips, Toast.LENGTH_LONG).show(); Toast.makeText(activity, tips, Toast.LENGTH_LONG).show();
} else {
options = null;
} }
Intent intent = new Intent(activity, YGOMobileActivity.class); Intent intent = new Intent(activity, YGOMobileActivity.class);
if (options != null) { if (options != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment