diff options
Diffstat (limited to 'app')
3 files changed, 20 insertions, 16 deletions
diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/testConfigurationWizard.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/testConfigurationWizard.java index 6d267e6e..931457ee 100644 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/testConfigurationWizard.java +++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/testConfigurationWizard.java @@ -72,7 +72,7 @@ public class testConfigurationWizard extends ActivityInstrumentationTestCase2<Co private void waitForProviderDetails() { String text = solo.getString(R.string.provider_details_fragment_title); - assertTrue("Provider details dialog did not appear", solo.waitForText(text, 1, 40*1000)); + assertTrue("Provider details dialog did not appear", solo.waitForText(text, 1, 60*1000)); } public void testAddNewProvider() { diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/testVpnFragment.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/testVpnFragment.java index 2f3d2614..032e4f9c 100644 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/testVpnFragment.java +++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/testVpnFragment.java @@ -1,7 +1,5 @@ package se.leap.bitmaskclient.test; -import java.util.Locale; - import de.blinkt.openvpn.activities.LogWindow; public class testVpnFragment extends BaseTestDashboard { @@ -50,7 +48,7 @@ public class testVpnFragment extends BaseTestDashboard { */ public void testOnFailed() { vpn_controller.clickVpnButton(); - assertTrue(solo.waitForActivity(LogWindow.class)); + assertTrue("Have you checked the trust vpn dialog?", solo.waitForActivity(LogWindow.class)); solo.goBack(); vpn_controller.iconShowsDisconnected(); } 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); } } |