summaryrefslogtreecommitdiff
path: root/app/src/production
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2023-10-25 14:54:41 +0200
committercyBerta <cyberta@riseup.net>2023-10-25 14:54:41 +0200
commitb2956073c6f0770347ec71bdc592b74426fddf2a (patch)
tree35cd853c8653909f13114d8c6eb368527aa044e8 /app/src/production
parent6d7a966b39a8a1208d67981e726c63d02efd4f4a (diff)
always show provider setup progress in percentage, combine tor bootstrap progress and provider api communication progress in case circumvention is needed
Diffstat (limited to 'app/src/production')
-rw-r--r--app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java b/app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java
index 59b9159c..b08f27ef 100644
--- a/app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java
+++ b/app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java
@@ -34,6 +34,9 @@ import static se.leap.bitmaskclient.base.utils.ConfigHelper.isDefaultBitmask;
import static se.leap.bitmaskclient.providersetup.ProviderAPI.ERRORS;
import static se.leap.bitmaskclient.providersetup.ProviderSetupFailedDialog.DOWNLOAD_ERRORS.ERROR_CERTIFICATE_PINNING;
import static se.leap.bitmaskclient.providersetup.ProviderSetupFailedDialog.DOWNLOAD_ERRORS.ERROR_CORRUPTED_PROVIDER_JSON;
+import static se.leap.bitmaskclient.providersetup.ProviderSetupObservable.DOWNLOADED_CA_CERT;
+import static se.leap.bitmaskclient.providersetup.ProviderSetupObservable.DOWNLOADED_EIP_SERVICE_JSON;
+import static se.leap.bitmaskclient.providersetup.ProviderSetupObservable.DOWNLOADED_PROVIDER_JSON;
import static se.leap.bitmaskclient.tor.TorStatusObservable.TorStatus.OFF;
import static se.leap.bitmaskclient.tor.TorStatusObservable.getProxyPort;
@@ -112,15 +115,19 @@ public class ProviderApiManager extends ProviderApiManagerBase {
currentDownload = getAndSetProviderJson(provider);
if (provider.hasDefinition() || (currentDownload.containsKey(BROADCAST_RESULT_KEY) && currentDownload.getBoolean(BROADCAST_RESULT_KEY))) {
+ ProviderSetupObservable.updateProgress(DOWNLOADED_PROVIDER_JSON);
if (!provider.hasCaCert()) {
currentDownload = downloadCACert(provider);
}
if (provider.hasCaCert() || (currentDownload.containsKey(BROADCAST_RESULT_KEY) && currentDownload.getBoolean(BROADCAST_RESULT_KEY))) {
+ ProviderSetupObservable.updateProgress(DOWNLOADED_CA_CERT);
currentDownload = getAndSetEipServiceJson(provider);
}
if (provider.hasEIP() && !provider.allowsRegistered() && !provider.allowsAnonymous()) {
setErrorResult(currentDownload, isDefaultBitmask() ? setup_error_text : setup_error_text_custom, null);
+ } else if (provider.hasEIP()) {
+ ProviderSetupObservable.updateProgress(DOWNLOADED_EIP_SERVICE_JSON);
}
}