Commit 989cbbdb authored by Drahomír Karchňák's avatar Drahomír Karchňák

Fix up

parent 98819e57
......@@ -223,10 +223,15 @@ public class CheckSettingsTask extends AsyncTask<Void, Void, JSONArray>
// Servers
Log.i(getClass().getSimpleName(), "Servers");
final Set<String> serverSet;
final JSONArray servers = resultListItem.optJSONArray("servers");
if (servers == null)
if (servers == null || servers.length() == 0) {
Log.i(getClass().getSimpleName(), "No servers found in the response.");
serverSet = null;
}
else
{
serverSet = new TreeSet<String>();
......@@ -240,7 +245,7 @@ public class CheckSettingsTask extends AsyncTask<Void, Void, JSONArray>
serverSet.add(server.encode());
System.out.println("server: " + serverName + " " + serverUuid);
Log.i(getClass().getSimpleName(), "Server: " + serverName + "(" + serverUuid + ")");
}
}
ConfigHelper.setServers(activity, serverSet);
......
......@@ -270,7 +270,10 @@ public class SettingsResource extends ServerResource
jsonItem.put("versions", jsonControlServerVersion);
//servers
final boolean userServerSelection = request.optBoolean("user_server_selection", false);
boolean userServerSelection = request.optBoolean("user_server_selection", false);
//TODO - TEMPORARY
userServerSelection = true;
if(userServerSelection) {
final String serverType;
......
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