From 4e6fa88d097d17ab7ab4eafb5243cebd16cb5f9a Mon Sep 17 00:00:00 2001 From: chrqls Date: Fri, 15 Nov 2013 18:55:54 +0100 Subject: [PATCH] [#40] Removing console.log + fixing a bug when session is recovered or created --- .../java/org/smilec/smile/bu/SmilePlugServerManager.java | 2 +- .../java/org/smilec/smile/ui/ChooseActivityFlowDialog.java | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/smilec/smile/bu/SmilePlugServerManager.java b/src/main/java/org/smilec/smile/bu/SmilePlugServerManager.java index 4afbaef..99eddf0 100644 --- a/src/main/java/org/smilec/smile/bu/SmilePlugServerManager.java +++ b/src/main/java/org/smilec/smile/bu/SmilePlugServerManager.java @@ -43,7 +43,6 @@ public class SmilePlugServerManager extends AbstractBaseManager { - // XXX TODO: Add arguments to take Teacher Name, Session Name, and Group Name public void startMakingQuestions(String ip, Context context) throws NetworkErrorException { String url = SmilePlugUtil.createUrl(ip, SmilePlugUtil.START_MAKING_QUESTIONS_URL); put(ip, context, url, "{}"); @@ -86,6 +85,7 @@ public void resetGame(String ip, Context context) throws NetworkErrorException { } + // XXX TODO: Add arguments to take Teacher Name, Session Name, and Group Name public void createSession(String ip, String teacherName, String sessionTitle, String groupName, Context context) throws NetworkErrorException { String url = SmilePlugUtil.createUrl(ip, SmilePlugUtil.CREATE_SESSION); diff --git a/src/main/java/org/smilec/smile/ui/ChooseActivityFlowDialog.java b/src/main/java/org/smilec/smile/ui/ChooseActivityFlowDialog.java index 4031365..7a92505 100644 --- a/src/main/java/org/smilec/smile/ui/ChooseActivityFlowDialog.java +++ b/src/main/java/org/smilec/smile/ui/ChooseActivityFlowDialog.java @@ -99,11 +99,7 @@ private class StartButtonListener implements OnClickListener { @Override public void onClick(View v) { - System.out.println("READY ???"); - System.out.println(">>>>>>>>>>>> status="+status); - System.out.println("JOB IS DONE ("+status.equals("")+")"); - - if (status != null && !status.equals("")) { + if (status != null && !status.equals("") && !status.equals("RESET")) { // AlertDialog.Builder builder = new AlertDialog.Builder(ChooseActivityFlowDialog.this); // builder.setMessage(R.string.game_running).setCancelable(false).setNeutralButton("Ok", new DialogInterface.OnClickListener() { @@ -117,7 +113,6 @@ public void onClick(View v) { ActivityUtil.showLongToast(ChooseActivityFlowDialog.this, R.string.recovering); // AlertDialog alert = builder.create(); // alert.show(); - } else { new LoadTask(ChooseActivityFlowDialog.this).execute(); ActivityUtil.showLongToast(ChooseActivityFlowDialog.this, R.string.starting);