summaryrefslogtreecommitdiff
path: root/src/se/leap/bitmaskclient/ConfigurationWizard.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/se/leap/bitmaskclient/ConfigurationWizard.java')
-rw-r--r--src/se/leap/bitmaskclient/ConfigurationWizard.java32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/se/leap/bitmaskclient/ConfigurationWizard.java b/src/se/leap/bitmaskclient/ConfigurationWizard.java
index 43ac8dd8..36d90318 100644
--- a/src/se/leap/bitmaskclient/ConfigurationWizard.java
+++ b/src/se/leap/bitmaskclient/ConfigurationWizard.java
@@ -149,16 +149,14 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn
if(resultData.containsKey(Provider.NAME)) {
String provider_id = resultData.getString(Provider.NAME);
mSelectedProvider = getProvider(provider_id);
- provider_list_fragment.addItem(mSelectedProvider);
- ProviderListContent.removeItem(mSelectedProvider);
+ //provider_list_fragment.addItem(mSelectedProvider);
+ //ProviderListContent.removeItem(mSelectedProvider);
- if(mSelectedProvider.custom)
- refreshProviderList(0);
+ //refreshProviderList(0);
if(!mProgressBar.isShown()) {
int provider_index = getProviderIndex(provider_id);
startProgressBar(provider_index);
- provider_list_fragment = (ProviderListFragment) getFragmentManager().findFragmentByTag(ProviderListFragment.TAG);
provider_list_fragment.hide(provider_index-2);
//setProviderList(provider_list_fragment);
}
@@ -171,7 +169,7 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn
e.printStackTrace();
mProgressBar.setVisibility(ProgressBar.GONE);
progressbar_description.setVisibility(TextView.GONE);
- refreshProviderList(0);
+ //refreshProviderList(0);
//Toast.makeText(this, getResources().getString(R.string.config_error_parsing), Toast.LENGTH_LONG);
setResult(RESULT_CANCELED, mConfigState);
}
@@ -194,7 +192,7 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn
mProgressBar.incrementProgressBy(1);
mProgressBar.setVisibility(ProgressBar.GONE);
progressbar_description.setVisibility(TextView.GONE);
- refreshProviderList(0);
+ //refreshProviderList(0);
//Toast.makeText(getApplicationContext(), R.string.success, Toast.LENGTH_LONG).show();
setResult(RESULT_OK);
showProviderDetails(getCurrentFocus());
@@ -288,7 +286,7 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn
while(providers_iterator.hasNext()) {
ProviderItem provider = providers_iterator.next();
index++;
- if(provider.id.equalsIgnoreCase(id)) {
+ if(provider.name().equalsIgnoreCase(id)) {
break;
}
}
@@ -447,18 +445,22 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn
private void showProvider(final String provider_main_url, final boolean danger_on) {
String provider_name = provider_main_url.replaceFirst("http[s]?://", "").replaceFirst("\\/", "_");
- boolean custom = true;
- final ProviderItem added_provider = new ProviderItem(provider_name, provider_main_url, custom, danger_on);
+ final ProviderItem added_provider = new ProviderItem(provider_name, provider_main_url, danger_on);
+
+ //ProviderListContent.addItem(added_provider);
+ provider_list_fragment.addItem(added_provider);
+ /*ProviderListFragment provider_list_fragment = (ProviderListFragment) getFragmentManager().findFragmentByTag(ProviderListFragment.TAG);
+ //provider_list_fragment.notifyAdapter();
+ provider_list_fragment.addItem(added_provider);
+ refreshProviderList(0);
+
runOnUiThread(new Runnable() {
@Override
public void run() {
- // TODO Auto-generated method stub
- ProviderListContent.addItem(added_provider);
- ProviderListFragment provider_list_fragment = (ProviderListFragment) getFragmentManager().findFragmentByTag("providerlist");
- provider_list_fragment.notifyAdapter();
+ provider_list_fragment.addItem(added_provider);
}
- });
+ });*/
}
/**