summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/providersetup/activities/ConfigWizardBaseActivity.java15
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/providersetup/activities/ProviderSetupBaseActivity.java4
2 files changed, 16 insertions, 3 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/activities/ConfigWizardBaseActivity.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/activities/ConfigWizardBaseActivity.java
index a0c046de..930c0f73 100644
--- a/app/src/main/java/se/leap/bitmaskclient/providersetup/activities/ConfigWizardBaseActivity.java
+++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/activities/ConfigWizardBaseActivity.java
@@ -31,6 +31,7 @@ import java.util.Observable;
import java.util.Observer;
import butterknife.BindView;
+import se.leap.bitmaskclient.BuildConfig;
import se.leap.bitmaskclient.R;
import se.leap.bitmaskclient.base.models.Provider;
import se.leap.bitmaskclient.base.views.ProviderHeaderView;
@@ -218,6 +219,16 @@ public abstract class ConfigWizardBaseActivity extends ButterKnifeActivity imple
providerHeaderView.setTitle(providerHeaderText);
}
+ protected void hideConnectionDetails() {
+ if (loadingScreen == null) {
+ return;
+ }
+
+ connectionDetailBtn.setVisibility(VISIBLE);
+ connectionDetailContainer.setVisibility(GONE);
+ logsContainer.setVisibility(GONE);
+ }
+
protected void showConnectionDetails() {
if (loadingScreen == null) {
return;
@@ -257,9 +268,7 @@ public abstract class ConfigWizardBaseActivity extends ButterKnifeActivity imple
if (loadingScreen == null) {
return;
}
- connectionDetailBtn.setVisibility(VISIBLE);
- connectionDetailContainer.setVisibility(GONE);
- logsContainer.setVisibility(GONE);
+ hideConnectionDetails();
loadingScreen.setVisibility(GONE);
content.setVisibility(VISIBLE);
}
diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/activities/ProviderSetupBaseActivity.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/activities/ProviderSetupBaseActivity.java
index 7628dfcb..a9f773c3 100644
--- a/app/src/main/java/se/leap/bitmaskclient/providersetup/activities/ProviderSetupBaseActivity.java
+++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/activities/ProviderSetupBaseActivity.java
@@ -20,6 +20,7 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.util.Log;
+import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -89,9 +90,11 @@ public abstract class ProviderSetupBaseActivity extends ConfigWizardBaseActivity
showProgressBar();
} else if (PENDING_SHOW_FAILED_DIALOG == providerConfigState) {
showProgressBar();
+ hideConnectionDetails();
showDownloadFailedDialog();
} else if (SHOW_FAILED_DIALOG == providerConfigState) {
showProgressBar();
+ hideConnectionDetails();
} else if (SHOWING_PROVIDER_DETAILS == providerConfigState) {
cancelSettingUpProvider(false);
} else if (PENDING_SHOW_PROVIDER_DETAILS == providerConfigState) {
@@ -229,6 +232,7 @@ public abstract class ProviderSetupBaseActivity extends ConfigWizardBaseActivity
public void showDownloadFailedDialog() {
try {
providerConfigState = SHOW_FAILED_DIALOG;
+ hideConnectionDetails();
FragmentTransaction fragmentTransaction = fragmentManager.removePreviousFragment(ProviderSetupFailedDialog.TAG);
DialogFragment newFragment;
try {