summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerV5.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerV5.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerV5.java
index d5640126..71394eda 100644
--- a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerV5.java
+++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerV5.java
@@ -130,12 +130,21 @@ public class ProviderApiManagerV5 extends ProviderApiManagerBase implements IPro
return eventSender.setErrorResult(currentDownload, R.string.config_error_found, null);
}
+ try {
+ if (provider.hasIntroducer()) {
+ bm.setIntroducer(provider.getIntroducer().toUrl());
+ }
+ } catch (Exception e) {
+ return eventSender.setErrorResult(currentDownload, R.string.config_error_found, null);
+ }
+
if (PreferenceHelper.getUseBridges()) {
try {
String bridgesJson = bm.getAllBridges("", "", "", "");
provider.setBridges(bridgesJson);
} catch (Exception e) {
// TODO: send failed to fetch bridges event
+ return eventSender.setErrorResult(currentDownload, R.string.config_error_found, null);
}
} else {
try {
@@ -147,7 +156,7 @@ public class ProviderApiManagerV5 extends ProviderApiManagerBase implements IPro
}
}
-
+ currentDownload.putBoolean(BROADCAST_RESULT_KEY, true);
return currentDownload;
}