summaryrefslogtreecommitdiff
path: root/app/src/release/java/se
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2015-03-12 12:54:18 +0100
committerParménides GV <parmegv@sdf.org>2015-03-12 12:54:18 +0100
commit037d65da739ed2630affe181894e640fa06d35b1 (patch)
tree72c7127ff5efdb10ba6b2e85be29ea61ff99be2e /app/src/release/java/se
parentc5124635b8272d08538889c1a9edfafe4acaf759 (diff)
Restore state on Configuration Wizard.
Diffstat (limited to 'app/src/release/java/se')
-rw-r--r--app/src/release/java/se/leap/bitmaskclient/ConfigurationWizard.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/app/src/release/java/se/leap/bitmaskclient/ConfigurationWizard.java b/app/src/release/java/se/leap/bitmaskclient/ConfigurationWizard.java
index abab106d..f5e78e65 100644
--- a/app/src/release/java/se/leap/bitmaskclient/ConfigurationWizard.java
+++ b/app/src/release/java/se/leap/bitmaskclient/ConfigurationWizard.java
@@ -96,7 +96,6 @@ implements NewProviderDialogInterface, ProviderDetailFragmentInterface, Download
outState.putString(PROGRESSBAR_TEXT, progressbar_description.getText().toString());
if(selected_provider != null)
outState.putParcelable(Provider.KEY, selected_provider);
- outState.putParcelable(ProviderAPI.RECEIVER_KEY, providerAPI_result_receiver);
super.onSaveInstanceState(outState);
}
@@ -113,7 +112,6 @@ implements NewProviderDialogInterface, ProviderDetailFragmentInterface, Download
if (savedInstanceState != null)
restoreState(savedInstanceState);
- else
setUpProviderAPIResultReceiver();
}
@@ -121,9 +119,13 @@ implements NewProviderDialogInterface, ProviderDetailFragmentInterface, Download
progressbar_text = savedInstanceState.getString(PROGRESSBAR_TEXT, "");
provider_name = savedInstanceState.getString(Provider.NAME, "");
selected_provider = savedInstanceState.getParcelable(Provider.KEY);
- progress = savedInstanceState.getInt(PROGRESSBAR_NUMBER, -1);
- providerAPI_result_receiver = savedInstanceState.getParcelable(ProviderAPI.RECEIVER_KEY);
- providerAPI_result_receiver.setReceiver(this);
+
+ if(fragment_manager.findFragmentByTag(ProviderDetailFragment.TAG) == null && setting_up_provider) {
+ if (selected_provider != null)
+ onItemSelectedUi(selected_provider);
+ if (progress > 0)
+ mProgressBar.setProgress(progress);
+ }
}
@Override
@@ -355,6 +357,7 @@ implements NewProviderDialogInterface, ProviderDetailFragmentInterface, Download
DialogFragment newFragment = ProviderDetailFragment.newInstance();
newFragment.show(fragment_transaction, ProviderDetailFragment.TAG);
+ setting_up_provider = false;
}
}