diff options
author | Parménides GV <parmegv@sdf.org> | 2015-04-22 14:20:09 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2015-04-22 14:20:09 +0200 |
commit | 449c3953ce79947554bbfd6ed0386d68aa9f04bd (patch) | |
tree | 289724ea5320f22a63cc293f5bec96a61d203629 /app/src/release/java/se | |
parent | 1a1b49a36e6c8ddccdb2a3308b6739601a691efe (diff) |
Avoid the check for a null provider.
A provider can be asked if it's configured or not, so that we don't find
more provider = null issues.
I've created a DefaultedURL which links to https://example.net, so that
we can initialize an URL. I use composition instead of inheritance,
since URL class is final.
Diffstat (limited to 'app/src/release/java/se')
-rw-r--r-- | app/src/release/java/se/leap/bitmaskclient/ConfigurationWizard.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/src/release/java/se/leap/bitmaskclient/ConfigurationWizard.java b/app/src/release/java/se/leap/bitmaskclient/ConfigurationWizard.java index 68ff9e47..2742e1e9 100644 --- a/app/src/release/java/se/leap/bitmaskclient/ConfigurationWizard.java +++ b/app/src/release/java/se/leap/bitmaskclient/ConfigurationWizard.java @@ -98,8 +98,7 @@ public class ConfigurationWizard extends Activity outState.putInt(PROGRESSBAR_NUMBER, mProgressBar.getProgress()); if (progressbar_description != null) outState.putString(PROGRESSBAR_TEXT, progressbar_description.getText().toString()); - if (selected_provider != null) - outState.putParcelable(Provider.KEY, selected_provider); + outState.putParcelable(Provider.KEY, selected_provider); super.onSaveInstanceState(outState); } @@ -125,8 +124,7 @@ public class ConfigurationWizard extends Activity selected_provider = savedInstanceState.getParcelable(Provider.KEY); if (fragment_manager.findFragmentByTag(ProviderDetailFragment.TAG) == null && setting_up_provider) { - if (selected_provider != null) - onItemSelectedUi(); + onItemSelectedUi(); if (progress > 0) mProgressBar.setProgress(progress); } |