summaryrefslogtreecommitdiff
path: root/app/src/debug
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2014-12-09 15:58:09 +0100
committerParménides GV <parmegv@sdf.org>2014-12-09 15:58:09 +0100
commit7bbb5b69717393d87869ae6f16d6aff0578a81bf (patch)
tree20cd58c73ff92f0d0a8b75e214ab2a7ccf88fbcf /app/src/debug
parent5978db9bf758b7b229616d0575e327c58ad8cf94 (diff)
Save custom providers to sdcard.
Diffstat (limited to 'app/src/debug')
-rw-r--r--app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java14
1 files changed, 3 insertions, 11 deletions
diff --git a/app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java b/app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java
index 9af31fd8..2e3fb8f1 100644
--- a/app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java
+++ b/app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java
@@ -108,7 +108,7 @@ implements NewProviderDialogInterface, ProviderDetailFragmentInterface, Download
super.onCreate(savedInstanceState);
preferences = getSharedPreferences(Dashboard.SHARED_PREFERENCES, MODE_PRIVATE);
fragment_manager = new FragmentManagerEnhanced(getFragmentManager());
- provider_manager = new ProviderManager(getAssets());
+ provider_manager = ProviderManager.getInstance(getAssets(), getExternalFilesDir(null));
setUpInitialUI();
@@ -158,15 +158,6 @@ implements NewProviderDialogInterface, ProviderDetailFragmentInterface, Download
private void setUpProviderList() {
initProviderList();
- // provider_list_fragment = ProviderListFragment.newInstance();
-
- // Bundle arguments = new Bundle();
- // int configuration_wizard_request_code = getIntent().getIntExtra(Dashboard.REQUEST_CODE, -1);
- // if(configuration_wizard_request_code == Dashboard.SWITCH_PROVIDER)
- // arguments.putBoolean(ProviderListFragment.SHOW_ALL_PROVIDERS, true);
-
- // provider_list_fragment.setArguments(arguments);
-
}
@Override
@@ -390,7 +381,8 @@ implements NewProviderDialogInterface, ProviderDetailFragmentInterface, Download
public void showAndSelectProvider(String provider_main_url, boolean danger_on) {
try {
selected_provider = new Provider(new URL((provider_main_url)));
- provider_manager.add(selected_provider);
+ adapter.add(selected_provider);
+ adapter.saveProviders();
autoSelectProvider(selected_provider, danger_on);
} catch (MalformedURLException e) {
e.printStackTrace();