summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean Leonard <meanderingcode@aetherislands.net>2013-06-08 23:07:36 -0600
committerSean Leonard <meanderingcode@aetherislands.net>2013-06-08 23:07:36 -0600
commit1559bc45048fb877d45247f1aa9b51ee3632a3b8 (patch)
tree58a7e3e034347a5af8637207e7463312b1bcde6a /src
parente581c6f2c1844d5dd96b12413df91dbb06102282 (diff)
Rearrange if/elseif statements in ConfigurationWizard for logical sequence readability
Diffstat (limited to 'src')
-rw-r--r--src/se/leap/leapclient/ConfigurationWizard.java34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/se/leap/leapclient/ConfigurationWizard.java b/src/se/leap/leapclient/ConfigurationWizard.java
index 69f73561..2a9b93b2 100644
--- a/src/se/leap/leapclient/ConfigurationWizard.java
+++ b/src/se/leap/leapclient/ConfigurationWizard.java
@@ -73,23 +73,6 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn
.replace(R.id.configuration_wizard_layout, providerList, "providerlist")
.commit();
}
- else if(resultCode == ConfigHelper.CORRECTLY_DOWNLOADED_JSON_FILES) {
- if (ConfigHelper.getBoolFromSharedPref(ConfigHelper.ALLOWED_ANON)){
- mProgressDialog.setMessage(getResources().getString(R.string.config_downloading_certificates));
- mConfigState.putExtra(SERVICES_RETRIEVED, true);
- downloadAnonCert();
- } else {
- mProgressDialog.dismiss();
- Toast.makeText(getApplicationContext(), R.string.success, Toast.LENGTH_LONG).show();
- setResult(RESULT_OK);
- finish();
- }
- }
- else if(resultCode == ConfigHelper.INCORRECTLY_DOWNLOADED_JSON_FILES) {
- Toast.makeText(getApplicationContext(), "You have not entered a LEAP provider URL or it is unavailable", Toast.LENGTH_LONG).show();
- setResult(RESULT_CANCELED, mConfigState);
- finish();
- }
else if(resultCode == ConfigHelper.CORRECTLY_UPDATED_PROVIDER_DOT_JSON) {
JSONObject provider_json;
try {
@@ -119,6 +102,23 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn
setResult(RESULT_CANCELED, mConfigState);
finish();
}
+ else if(resultCode == ConfigHelper.CORRECTLY_DOWNLOADED_JSON_FILES) {
+ if (ConfigHelper.getBoolFromSharedPref(ConfigHelper.ALLOWED_ANON)){
+ mProgressDialog.setMessage(getResources().getString(R.string.config_downloading_certificates));
+ mConfigState.putExtra(SERVICES_RETRIEVED, true);
+ downloadAnonCert();
+ } else {
+ mProgressDialog.dismiss();
+ Toast.makeText(getApplicationContext(), R.string.success, Toast.LENGTH_LONG).show();
+ setResult(RESULT_OK);
+ finish();
+ }
+ }
+ else if(resultCode == ConfigHelper.INCORRECTLY_DOWNLOADED_JSON_FILES) {
+ Toast.makeText(getApplicationContext(), "You have not entered a LEAP provider URL or it is unavailable", Toast.LENGTH_LONG).show();
+ setResult(RESULT_CANCELED, mConfigState);
+ finish();
+ }
else if(resultCode == ConfigHelper.CORRECTLY_DOWNLOADED_CERTIFICATE) {
mProgressDialog.dismiss();
Toast.makeText(getApplicationContext(), "Your anon cert has been correctly downloaded", Toast.LENGTH_LONG).show();