summaryrefslogtreecommitdiff
path: root/app/src/production
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/production')
-rw-r--r--app/src/production/java/se/leap/bitmaskclient/ProviderApiManager.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/app/src/production/java/se/leap/bitmaskclient/ProviderApiManager.java b/app/src/production/java/se/leap/bitmaskclient/ProviderApiManager.java
index cdbe5f60..1372fc43 100644
--- a/app/src/production/java/se/leap/bitmaskclient/ProviderApiManager.java
+++ b/app/src/production/java/se/leap/bitmaskclient/ProviderApiManager.java
@@ -43,6 +43,7 @@ import static se.leap.bitmaskclient.ProviderSetupFailedDialog.DOWNLOAD_ERRORS.ER
import static se.leap.bitmaskclient.R.string.downloading_vpn_certificate_failed;
import static se.leap.bitmaskclient.R.string.error_io_exception_user_message;
import static se.leap.bitmaskclient.R.string.malformed_url;
+import static se.leap.bitmaskclient.R.string.setup_error_text;
import static se.leap.bitmaskclient.R.string.warning_corrupted_provider_cert;
import static se.leap.bitmaskclient.R.string.warning_corrupted_provider_details;
@@ -95,15 +96,18 @@ public class ProviderApiManager extends ProviderApiManagerBase {
resetProviderDetails(provider);
}
- if (!provider.hasDefinition()) {
- currentDownload = getAndSetProviderJson(provider);
- }
+ currentDownload = getAndSetProviderJson(provider);
if (provider.hasDefinition() || (currentDownload.containsKey(BROADCAST_RESULT_KEY) && currentDownload.getBoolean(BROADCAST_RESULT_KEY))) {
- if (!provider.hasCaCert())
+ if (!provider.hasCaCert()) {
currentDownload = downloadCACert(provider);
+ }
if (provider.hasCaCert() || (currentDownload.containsKey(BROADCAST_RESULT_KEY) && currentDownload.getBoolean(BROADCAST_RESULT_KEY))) {
currentDownload = getAndSetEipServiceJson(provider);
}
+
+ if (provider.hasEIP() && !provider.allowsRegistered() && !provider.allowsAnonymous()) {
+ setErrorResult(currentDownload, setup_error_text, null);
+ }
}
return currentDownload;