summaryrefslogtreecommitdiff
path: root/app/src/debug/java
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2014-12-09 12:08:40 +0100
committerParménides GV <parmegv@sdf.org>2014-12-09 12:08:40 +0100
commit7da04dc635505c0bcfdcc2c86d186a7a6f0535f4 (patch)
tree72c37bd326cd76367e25f0b4bcee60b4ba907add /app/src/debug/java
parent84f71ca604abb2b4aeb410dcec2c3cc5dff9bc39 (diff)
Release flavor updated, back button works.
Diffstat (limited to 'app/src/debug/java')
-rw-r--r--app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java27
1 files changed, 9 insertions, 18 deletions
diff --git a/app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java b/app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java
index dfca91ba..20545473 100644
--- a/app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java
+++ b/app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java
@@ -258,9 +258,10 @@ implements NewProviderDialogInterface, ProviderDetailFragmentInterface, Download
@Override
public void onBackPressed() {
if(setting_up_provider) {
- stopSettingUpProvider();
+ stopSettingUpProvider();
} else {
- usualBackButton();
+ askDashboardToQuitApp();
+ super.onBackPressed();
}
}
@@ -270,18 +271,13 @@ implements NewProviderDialogInterface, ProviderDetailFragmentInterface, Download
mProgressBar.setProgress(0);
progressbar_description.setVisibility(TextView.GONE);
- preferences.edit().remove(Provider.KEY).apply();
- setting_up_provider = false;
- showAllProviders();
+ cancelSettingUpProvider();
}
-
- private void usualBackButton() {
- if(preferences.getString(Provider.KEY, "").isEmpty()) {
- askDashboardToQuitApp();
- } else {
- setResult(RESULT_OK);
- }
- super.onBackPressed();
+
+ public void cancelSettingUpProvider() {
+ showAllProviders();
+ setting_up_provider = false;
+ preferences.edit().remove(Provider.KEY).remove(ProviderItem.DANGER_ON).remove(Constants.ALLOWED_ANON).remove(Constants.KEY).commit();
}
private void askDashboardToQuitApp() {
@@ -457,11 +453,6 @@ n * @param provider_main_url
public void showAllProviders() {
adapter.showAllProviders();
}
-
- public void cancelSettingUpProvider() {
- showAllProviders();
- preferences.edit().remove(Provider.KEY).remove(ProviderItem.DANGER_ON).remove(Constants.ALLOWED_ANON).remove(Constants.KEY).apply();
- }
@Override
public void login() {