summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2020-07-25 13:22:21 +0200
committercyBerta <cyberta@riseup.net>2020-07-25 13:22:21 +0200
commit82c0590775493e983239be49e8dc27eb94b835e2 (patch)
treeec47b6659cba106a303ae0ea83d945954893faf7 /app/src
parent324775ffad121f708e8f1d707c317db34f209c78 (diff)
fix provider setup after refactorings
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/ProviderSetupBaseActivity.java15
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/ProviderSetupInterface.java1
2 files changed, 6 insertions, 10 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderSetupBaseActivity.java b/app/src/main/java/se/leap/bitmaskclient/ProviderSetupBaseActivity.java
index 9c28800a..3bcc6feb 100644
--- a/app/src/main/java/se/leap/bitmaskclient/ProviderSetupBaseActivity.java
+++ b/app/src/main/java/se/leap/bitmaskclient/ProviderSetupBaseActivity.java
@@ -37,6 +37,7 @@ import static se.leap.bitmaskclient.ProviderAPI.DOWNLOAD_VPN_CERTIFICATE;
import static se.leap.bitmaskclient.ProviderAPI.ERRORS;
import static se.leap.bitmaskclient.ProviderAPI.UPDATE_PROVIDER_DETAILS;
import static se.leap.bitmaskclient.ProviderSetupInterface.ProviderConfigState.PENDING_SHOW_FAILED_DIALOG;
+import static se.leap.bitmaskclient.ProviderSetupInterface.ProviderConfigState.PENDING_SHOW_PROVIDER_DETAILS;
import static se.leap.bitmaskclient.ProviderSetupInterface.ProviderConfigState.PROVIDER_NOT_SET;
import static se.leap.bitmaskclient.ProviderSetupInterface.ProviderConfigState.SETTING_UP_PROVIDER;
import static se.leap.bitmaskclient.ProviderSetupInterface.ProviderConfigState.SHOWING_PROVIDER_DETAILS;
@@ -74,7 +75,6 @@ public abstract class ProviderSetupBaseActivity extends ConfigWizardBaseActivity
Log.d(TAG, "resuming with ConfigState: " + providerConfigState.toString());
if (SETTING_UP_PROVIDER == providerConfigState) {
showProgressBar();
- checkProviderSetUp();
} else if (PENDING_SHOW_FAILED_DIALOG == providerConfigState) {
showProgressBar();
showDownloadFailedDialog();
@@ -82,6 +82,8 @@ public abstract class ProviderSetupBaseActivity extends ConfigWizardBaseActivity
showProgressBar();
} else if (SHOWING_PROVIDER_DETAILS == providerConfigState) {
cancelSettingUpProvider();
+ } else if (PENDING_SHOW_PROVIDER_DETAILS == providerConfigState) {
+ showProviderDetails();
}
}
@@ -183,15 +185,6 @@ public abstract class ProviderSetupBaseActivity extends ConfigWizardBaseActivity
ProviderAPICommand.execute(this, DOWNLOAD_VPN_CERTIFICATE, provider);
}
- /*
- *
- */
- public void checkProviderSetUp() {
- if (provider.isConfigured()) {
- handleProviderSetUp(provider);
- }
- }
-
/**
* Once selected a provider, this fragment offers the user to log in,
* use it anonymously (if possible)
@@ -206,6 +199,8 @@ public abstract class ProviderSetupBaseActivity extends ConfigWizardBaseActivity
intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
intent.putExtra(PROVIDER_KEY, provider);
startActivityForResult(intent, REQUEST_CODE_CONFIGURE_LEAP);
+ } else {
+ providerConfigState = PENDING_SHOW_PROVIDER_DETAILS;
}
}
diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderSetupInterface.java b/app/src/main/java/se/leap/bitmaskclient/ProviderSetupInterface.java
index 2b921ef0..9cf4dc33 100644
--- a/app/src/main/java/se/leap/bitmaskclient/ProviderSetupInterface.java
+++ b/app/src/main/java/se/leap/bitmaskclient/ProviderSetupInterface.java
@@ -27,6 +27,7 @@ public interface ProviderSetupInterface {
PROVIDER_NOT_SET,
SETTING_UP_PROVIDER,
SHOWING_PROVIDER_DETAILS,
+ PENDING_SHOW_PROVIDER_DETAILS,
PENDING_SHOW_FAILED_DIALOG,
SHOW_FAILED_DIALOG,
}