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

Upgraded Restlet Servlet Extension dependancy.

parent 38f604c9
......@@ -40,8 +40,8 @@ repositories {
}
dependencies {
compile project(":util:clientSecret")
compile project(':RMBTUtil')
implementation project(":util:clientSecret")
implementation project(':RMBTUtil')
compile 'com.google.android.gms:play-services:4.+' // Not supported in Eclipse now. Needs to install Google play Services from Android SDK Manager and use it as a library project.
compile 'dnsjava:dnsjava:2.1.6'
compile 'net.sf.jopt-simple:jopt-simple:3.2'
......@@ -240,7 +240,7 @@ android {
signingConfig signingConfigs.release
applicationVariants.all { variant ->
variant.outputs.each { output ->
variant.outputs.all { output ->
def file = output.outputFile
outputFileName = file.name.replace(".apk", "-" + defaultConfig.versionName + ".apk")
}
......
......@@ -224,15 +224,20 @@ public class CheckSettingsTask extends AsyncTask<Void, Void, JSONArray>
// Servers
final Set<String> serverSet;
final JSONArray servers = resultListItem.optJSONArray("servers");
if (servers == null)
final JSONArray servers = resultListItem.getJSONArray("servers");
if (servers == null || servers.length() == 0) {
Log.i(getClass().getSimpleName(), "No servers found in the response.");
serverSet = null;
}
else
{
Log.i(getClass().getSimpleName(), "Loading server list");
serverSet = new TreeSet<String>();
for (int i = 0; i < servers.length(); i++)
{
final JSONObject serverObj = (JSONObject) servers.get(i);
final JSONObject serverObj = servers.getJSONObject(i);
final String serverName = serverObj.getString("name");
final String serverUuid = serverObj.getString("uuid");
......@@ -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.toString());
}
}
ConfigHelper.setServers(activity, serverSet);
......
......@@ -74,5 +74,8 @@ public class Server
return true;
}
}
@Override
public String toString() {
return "Server: " + name + "(" + uuid + ")";
}
}
\ No newline at end of file
......@@ -31,9 +31,9 @@ def revisionPropertiesFile = file("${buildDir}/resources/main/revision.propertie
dependencies {
compile 'net.sf.uadetector:uadetector-resources:2014.10'
compile 'commons-io:commons-io:2.4'
compile 'org.restlet.jee:org.restlet.ext.servlet:2.1.1'
compile project(':RMBTSharedCode')
compile project(":util:clientSecret")
compile 'org.restlet.jee:org.restlet.ext.servlet:2.1.7'
implementation project(':RMBTSharedCode')
implementation project(":util:clientSecret")
}
processResources << {
......
......@@ -353,7 +353,7 @@ public class SettingsResource extends ServerResource
private JSONArray getServersForServerType(String serverType) {
//empty
if(serverType != null)
if(serverType == null)
return new JSONArray();
final JSONArray result = new JSONArray();
......
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