diff --git a/src/cz/fit/tam/NewGameActivity.java b/src/cz/fit/tam/NewGameActivity.java index 959c2a4..ee89b35 100644 --- a/src/cz/fit/tam/NewGameActivity.java +++ b/src/cz/fit/tam/NewGameActivity.java @@ -243,7 +243,6 @@ protected Boolean doInBackground(NewGameActivity... activity) { } protected void onPostExecute(Boolean result) { - // activity.setGameProperties(result); Intent myIntent1 = new Intent(NewGameActivity.this, WaitForGameActivity.class); diff --git a/src/cz/fit/tam/WaitForGameActivity.java b/src/cz/fit/tam/WaitForGameActivity.java index 409b902..545b87d 100644 --- a/src/cz/fit/tam/WaitForGameActivity.java +++ b/src/cz/fit/tam/WaitForGameActivity.java @@ -3,10 +3,10 @@ import android.app.Activity; import android.os.AsyncTask; import android.os.Bundle; +import android.util.Log; import android.widget.TextView; import android.widget.Toast; import cz.fit.tam.model.Game; -import cz.fit.tam.model.GameClient; import cz.fit.tam.model.GameProperties; /* @@ -95,12 +95,7 @@ private class StopGameAsyncTask extends protected Boolean doInBackground(WaitForGameActivity... activity) { activityWait = activity[0]; - try { - activity[0].getCurrentGame().stop(); - } catch (Exception e) { - Toast.makeText(activity[0], "ERROR " + e.getMessage(), - Toast.LENGTH_SHORT).show(); - } + activity[0].getCurrentGame().stop(); return true; } diff --git a/src/cz/fit/tam/model/GameClient.java b/src/cz/fit/tam/model/GameClient.java index 0d8063f..eb71014 100644 --- a/src/cz/fit/tam/model/GameClient.java +++ b/src/cz/fit/tam/model/GameClient.java @@ -138,14 +138,12 @@ public void connect(Integer joiningGameId) { public void stop(Integer gameId) { Map arguments = new HashMap(); arguments.put("command", GameClient.COMMAND_STOP_GAME); - Log.v("STOP GAME", gameId.toString()); arguments.put("id", gameId.toString()); arguments.put("admin_token", ((Admin) player).getAdminToken() .getValue()); try { - JSONObject response = messaging.sendMessage(arguments); - Log.v("STOP GAME", response.toString()); + messaging.sendMessage(arguments); connected = false; } catch (IOException ex) { Logger.getLogger(GameClient.class.getName()).log(Level.SEVERE,