summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java
diff options
context:
space:
mode:
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);
+ }
}