summaryrefslogtreecommitdiff
path: root/app/src/main/java/se
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/se')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/EIP.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java b/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java
index 19c539e8..474e639e 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java
@@ -77,6 +77,7 @@ import static se.leap.bitmaskclient.Constants.PROVIDER_VPN_CERTIFICATE;
import static se.leap.bitmaskclient.Constants.SHARED_PREFERENCES;
import static se.leap.bitmaskclient.MainActivityErrorDialog.DOWNLOAD_ERRORS.ERROR_INVALID_VPN_CERTIFICATE;
import static se.leap.bitmaskclient.R.string.vpn_certificate_is_invalid;
+import static se.leap.bitmaskclient.R.string.warning_client_parsing_error_gateways;
import static se.leap.bitmaskclient.utils.ConfigHelper.ensureNotOnMainThread;
import static se.leap.bitmaskclient.utils.PreferenceHelper.getUsePluggableTransports;
@@ -206,6 +207,12 @@ public final class EIP extends JobIntentService implements Observer {
}
GatewaysManager gatewaysManager = gatewaysFromPreferences();
+ if (gatewaysManager.isEmpty()) {
+ setErrorResult(result, warning_client_parsing_error_gateways, null);
+ tellToReceiverOrBroadcast(EIP_ACTION_START, RESULT_CANCELED, result);
+ return;
+ }
+
Gateway gateway = gatewaysManager.select(nClosestGateway);
if (launchActiveGateway(gateway, nClosestGateway)) {
@@ -377,7 +384,6 @@ public final class EIP extends JobIntentService implements Observer {
result.putBoolean(BROADCAST_RESULT_KEY, false);
}
-
/**
* disable Bitmask starting on after phone reboot
* then stop VPN