diff options
author | Parménides GV <parmegv@sdf.org> | 2013-06-29 16:24:30 +0200 |
---|---|---|
committer | Sean Leonard <meanderingcode@aetherislands.net> | 2013-07-12 11:54:52 -0600 |
commit | 6d532dd2d1a159d0053f5247db7d0c5480ce081e (patch) | |
tree | c5af8bcb102434d3685adfa1793368c8a99ffaa0 /src | |
parent | 6776f5eb7b384982ffab3cfd285c3180ecb14bc8 (diff) |
ProgressDialog works ok when discarding providers.
If the user selects a provider, gets into provider detail, discards it,
further trials of selecting a provider trigger the same ProgressDialogs
than the initial trials.
Diffstat (limited to 'src')
-rw-r--r-- | src/se/leap/leapclient/ConfigurationWizard.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/se/leap/leapclient/ConfigurationWizard.java b/src/se/leap/leapclient/ConfigurationWizard.java index a9fac096..5eab3053 100644 --- a/src/se/leap/leapclient/ConfigurationWizard.java +++ b/src/se/leap/leapclient/ConfigurationWizard.java @@ -20,7 +20,6 @@ import android.content.res.AssetManager; import android.os.Bundle;
import android.os.Handler;
import android.view.View;
-import android.widget.Toast;
/**
* Activity that builds and shows the list of known available providers.
@@ -82,8 +81,8 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn ConfigHelper.saveSharedPref(ConfigHelper.ALLOWED_ANON, provider_json.getJSONObject(ConfigHelper.SERVICE_KEY).getBoolean(ConfigHelper.ALLOWED_ANON));
mConfigState.setAction(PROVIDER_SET);
- if(mProgressDialog == null)
- mProgressDialog = ProgressDialog.show(this, getResources().getString(R.string.config_wait_title), getResources().getString(R.string.config_connecting_provider), true);
+ if(mProgressDialog != null) mProgressDialog.dismiss();
+ mProgressDialog = ProgressDialog.show(this, getResources().getString(R.string.config_wait_title), getResources().getString(R.string.config_connecting_provider), true);
mProgressDialog.setMessage(getResources().getString(R.string.config_downloading_services));
if(resultData.containsKey(ConfigHelper.PROVIDER_ID))
mSelectedProvider = getProvider(resultData.getString(ConfigHelper.PROVIDER_ID));
@@ -143,8 +142,7 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn public void onItemSelected(String id) {
//TODO Code 2 pane view
ProviderItem selected_provider = getProvider(id);
- if(mProgressDialog == null)
- mProgressDialog = ProgressDialog.show(this, getResources().getString(R.string.config_wait_title), getResources().getString(R.string.config_connecting_provider), true);
+ mProgressDialog = ProgressDialog.show(this, getResources().getString(R.string.config_wait_title), getResources().getString(R.string.config_connecting_provider), true);
mSelectedProvider = selected_provider;
saveProviderJson(mSelectedProvider);
}
|