summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2015-01-19 16:29:40 +0100
committerParménides GV <parmegv@sdf.org>2015-01-19 16:29:40 +0100
commitae37fca1b733620951c8c90325beeef27e93c4bf (patch)
tree725ff1c7c9d22a2f6bda112da4a2983e98a315cf /app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java
parent67633d1bf6e63028cfac1e9d719d5ed4e7574124 (diff)
parentdbc8bc453d71a6c485a40f021fb66436c8e63616 (diff)
Merge branch 'develop' into release-0.9.0
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java b/app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java
index daf7d4a7..0d8a2f7b 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java
@@ -20,6 +20,8 @@ import android.app.Activity;
import android.content.SharedPreferences;
import android.util.Log;
+import com.google.gson.Gson;
+
import org.json.JSONException;
import org.json.JSONObject;
@@ -40,7 +42,7 @@ import se.leap.bitmaskclient.Dashboard;
*/
public class Gateway {
- public static String TAG = Gateway.class.getSimpleName();
+ public final static String TAG = Gateway.class.getSimpleName();
private JSONObject general_configuration;
private JSONObject secrets;
@@ -53,7 +55,7 @@ public class Gateway {
* Build a gateway object from a JSON OpenVPN gateway definition in eip-service.json
* and create a VpnProfile belonging to it.
*/
- protected Gateway(JSONObject eip_definition, JSONObject secrets, JSONObject gateway){
+ public Gateway(JSONObject eip_definition, JSONObject secrets, JSONObject gateway){
this.gateway = gateway;
this.secrets = secrets;
@@ -130,4 +132,9 @@ public class Gateway {
public int getTimezone() {
return timezone;
}
+
+ @Override
+ public String toString() {
+ return new Gson().toJson(this, Gateway.class);
+ }
}