From 4a8c2f34c3bbac63e0900f86bff53d11b7831151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Wed, 9 Apr 2014 18:43:29 +0200 Subject: Bitmask loads all preseeded providers correctly. If you choose one and then tap "Switch provider" button, no duplicated providers are shown. --- .../se/leap/bitmaskclient/ProviderListContent.java | 28 +--------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'app/src/debug/java/se/leap/bitmaskclient/ProviderListContent.java') diff --git a/app/src/debug/java/se/leap/bitmaskclient/ProviderListContent.java b/app/src/debug/java/se/leap/bitmaskclient/ProviderListContent.java index e1ca4f9a..8c8fb69f 100644 --- a/app/src/debug/java/se/leap/bitmaskclient/ProviderListContent.java +++ b/app/src/debug/java/se/leap/bitmaskclient/ProviderListContent.java @@ -61,36 +61,10 @@ public class ProviderListContent { final public static String DANGER_ON = "danger_on"; private String provider_main_url; private String name; - - /** - * @param name of the provider - * @param urls_file_input_stream file input stream linking with the assets url file - * @param custom if it's a new provider entered by the user or not - * @param danger_on if the user trusts completely the new provider - */ - public ProviderItem(String name, InputStream urls_file_input_stream) { - - try { - byte[] urls_file_bytes = new byte[urls_file_input_stream.available()]; - urls_file_input_stream.read(urls_file_bytes); - String urls_file_content = new String(urls_file_bytes); - JSONObject file_contents = new JSONObject(urls_file_content); - provider_main_url = file_contents.getString(Provider.MAIN_URL); - this.name = name; - } catch (JSONException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - + /** * @param name of the provider * @param provider_main_url used to download provider.json file of the provider - * @param provider_json already downloaded - * @param custom if it's a new provider entered by the user or not */ public ProviderItem(String name, String provider_main_url) { this.name = name; -- cgit v1.2.3