summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2014-03-19 11:48:46 +0100
committerParménides GV <parmegv@sdf.org>2014-03-29 01:48:39 +0100
commit5a30e96c5b3ccbac42cdaef91b5c37ba0f7abf27 (patch)
treebe7abfb2345dd4c02e204135b4667c94563b998c /src
parentec3ee9b8bc4ace6d67908a3a612f1846ab80f624 (diff)
Pressing back always returns to CW.
This commit fixes a problem when back was pressed when the vpn certificate had been already downloaded (2/3 of the progressbar).
Diffstat (limited to 'src')
-rw-r--r--src/se/leap/bitmaskclient/ConfigurationWizard.java22
-rw-r--r--src/se/leap/bitmaskclient/ProviderDetailFragment.java2
2 files changed, 13 insertions, 11 deletions
diff --git a/src/se/leap/bitmaskclient/ConfigurationWizard.java b/src/se/leap/bitmaskclient/ConfigurationWizard.java
index 7e86ca60..1c839389 100644
--- a/src/se/leap/bitmaskclient/ConfigurationWizard.java
+++ b/src/se/leap/bitmaskclient/ConfigurationWizard.java
@@ -178,8 +178,8 @@ implements ProviderListFragment.Callbacks, NewProviderDialogInterface, ProviderD
mProgressBar.setVisibility(ProgressBar.GONE);
progressbar_description.setVisibility(TextView.GONE);
//refreshProviderList(0);
- setResult(RESULT_OK);
- showProviderDetails(getCurrentFocus());
+ setResult(RESULT_OK);
+ showProviderDetails(getCurrentFocus());
} else if(resultCode == ProviderAPI.INCORRECTLY_DOWNLOADED_CERTIFICATE) {
//refreshProviderList(0);
mProgressBar.setVisibility(ProgressBar.GONE);
@@ -428,15 +428,17 @@ implements ProviderListFragment.Callbacks, NewProviderDialogInterface, ProviderD
* @param view
*/
public void showProviderDetails(View view) {
- FragmentTransaction fragment_transaction = getFragmentManager().beginTransaction();
- Fragment previous_provider_details_dialog = getFragmentManager().findFragmentByTag(ProviderDetailFragment.TAG);
- if (previous_provider_details_dialog != null) {
- fragment_transaction.remove(previous_provider_details_dialog);
+ if(setting_up_provider) {
+ FragmentTransaction fragment_transaction = getFragmentManager().beginTransaction();
+ Fragment previous_provider_details_dialog = getFragmentManager().findFragmentByTag(ProviderDetailFragment.TAG);
+ if (previous_provider_details_dialog != null) {
+ fragment_transaction.remove(previous_provider_details_dialog);
+ }
+ fragment_transaction.addToBackStack(null);
+
+ DialogFragment newFragment = ProviderDetailFragment.newInstance();
+ newFragment.show(fragment_transaction, ProviderDetailFragment.TAG);
}
- fragment_transaction.addToBackStack(null);
-
- DialogFragment newFragment = ProviderDetailFragment.newInstance();
- newFragment.show(fragment_transaction, ProviderDetailFragment.TAG);
}
public void showAndSelectProvider(String provider_main_url, boolean danger_on) {
diff --git a/src/se/leap/bitmaskclient/ProviderDetailFragment.java b/src/se/leap/bitmaskclient/ProviderDetailFragment.java
index 3ed04184..c067ce2b 100644
--- a/src/se/leap/bitmaskclient/ProviderDetailFragment.java
+++ b/src/se/leap/bitmaskclient/ProviderDetailFragment.java
@@ -56,7 +56,7 @@ public class ProviderDetailFragment extends DialogFragment {
}
});
}
-
+
return builder.create();
} catch (JSONException e) {
return null;