summaryrefslogtreecommitdiff
path: root/app/src/release
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/release
parent5978db9bf758b7b229616d0575e327c58ad8cf94 (diff)
Save custom providers to sdcard.
Diffstat (limited to 'app/src/release')
-rw-r--r--app/src/release/java/se/leap/bitmaskclient/ConfigurationWizard.java20
1 files changed, 4 insertions, 16 deletions
diff --git a/app/src/release/java/se/leap/bitmaskclient/ConfigurationWizard.java b/app/src/release/java/se/leap/bitmaskclient/ConfigurationWizard.java
index ef7986f1..42736444 100644
--- a/app/src/release/java/se/leap/bitmaskclient/ConfigurationWizard.java
+++ b/app/src/release/java/se/leap/bitmaskclient/ConfigurationWizard.java
@@ -24,12 +24,11 @@ import android.widget.*;
import com.pedrogomez.renderers.*;
-import java.io.*;
import java.net.*;
import java.util.*;
import butterknife.*;
-import org.jetbrains.annotations.NotNull;
+
import org.json.*;
import javax.inject.Inject;
@@ -38,8 +37,6 @@ import se.leap.bitmaskclient.DownloadFailedDialog.DownloadFailedDialogInterface;
import se.leap.bitmaskclient.NewProviderDialog.NewProviderDialogInterface;
import se.leap.bitmaskclient.ProviderAPIResultReceiver.Receiver;
import se.leap.bitmaskclient.ProviderDetailFragment.ProviderDetailFragmentInterface;
-import se.leap.bitmaskclient.ProviderListContent.ProviderItem;
-import se.leap.bitmaskclient.FragmentManagerEnhanced;
import se.leap.bitmaskclient.eip.Constants;
/**
@@ -112,7 +109,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();
@@ -163,16 +160,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);
-
- // putProviderListFragment();
}
private void putProviderListFragment() {
@@ -397,7 +384,8 @@ implements NewProviderDialogInterface, ProviderDetailFragmentInterface, Download
public void showAndSelectProvider(String provider_main_url) {
try {
selected_provider = new Provider(new URL((provider_main_url)));
- provider_manager.add(selected_provider);
+ adapter.add(selected_provider);
+ adapter.saveProviders();
autoSelectProvider(selected_provider);
} catch (MalformedURLException e) {
e.printStackTrace();