summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2015-06-01 10:21:30 +0200
committerParménides GV <parmegv@sdf.org>2015-06-01 10:21:30 +0200
commit8d9fe391390578351ae11c7d4305a5b5e5088fb4 (patch)
tree987aa93ba9561a6c374da5d768c945917d52674d /app/src/main
parentde63a99c74bb05c271b0c7a5903b6bfab9ec0a5b (diff)
parentfcc8c55139143092005ffa5b56df2f4320fd9ec4 (diff)
Merge branch 'bug/pass-tests-for-0.9.4-#7078' into feature/Put-an-icon-in-the-user-status-FabButton-#6923
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/GatewaysManager.java30
1 files changed, 18 insertions, 12 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/GatewaysManager.java b/app/src/main/java/se/leap/bitmaskclient/eip/GatewaysManager.java
index 171035d1..f41049c5 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/GatewaysManager.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/GatewaysManager.java
@@ -16,20 +16,27 @@
*/
package se.leap.bitmaskclient.eip;
-import android.content.*;
+import android.content.Context;
+import android.content.SharedPreferences;
-import com.google.gson.*;
-import com.google.gson.reflect.*;
-import com.google.gson.stream.JsonWriter;
+import com.google.gson.Gson;
+import com.google.gson.JsonSyntaxException;
+import com.google.gson.reflect.TypeToken;
-import org.json.*;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
-import java.lang.reflect.*;
-import java.util.*;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
-import de.blinkt.openvpn.*;
-import de.blinkt.openvpn.core.*;
-import se.leap.bitmaskclient.*;
+import de.blinkt.openvpn.VpnProfile;
+import de.blinkt.openvpn.core.Connection;
+import de.blinkt.openvpn.core.ProfileManager;
+import se.leap.bitmaskclient.Provider;
/**
* @author parmegv
@@ -66,7 +73,7 @@ public class GatewaysManager {
}
public void addFromString(String gateways) {
- List<Gateway> gateways_list = new ArrayList<Gateway>();
+ List<Gateway> gateways_list = new ArrayList<>();
try {
gateways_list = new Gson().fromJson(gateways, list_type);
} catch (JsonSyntaxException e) {
@@ -76,7 +83,6 @@ public class GatewaysManager {
if (gateways_list != null) {
for (Gateway gateway : gateways_list)
addGateway(gateway);
- this.gateways.addAll(gateways_list);
}
}