diff options
author | Parménides GV <parmegv@sdf.org> | 2013-10-14 13:08:22 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2013-11-19 17:52:47 +0100 |
commit | aa2b794baeffe7afc8c3c5bbac8b76e8829af84f (patch) | |
tree | 88d552ee86869c4fe91763680e884937df2b344f /src/se/leap/bitmaskclient/ProviderAPI.java | |
parent | 5ad4fada2452645fcd60f2ff1b8dac7fddeaadc9 (diff) |
Successfully rebased onto progress-bars.
Diffstat (limited to 'src/se/leap/bitmaskclient/ProviderAPI.java')
-rw-r--r-- | src/se/leap/bitmaskclient/ProviderAPI.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/se/leap/bitmaskclient/ProviderAPI.java b/src/se/leap/bitmaskclient/ProviderAPI.java index c9da5c63..ddf1b9f8 100644 --- a/src/se/leap/bitmaskclient/ProviderAPI.java +++ b/src/se/leap/bitmaskclient/ProviderAPI.java @@ -485,7 +485,9 @@ public class ProviderAPI extends IntentService { private Bundle updateProviderDotJSON(Bundle task) { Bundle result = new Bundle(); boolean danger_on = task.getBoolean(ProviderItem.DANGER_ON); - String provider_json_url = task.getString(Provider.MAIN_URL) + "/provider.json"; + String provider_main_url = task.getString(Provider.MAIN_URL); + String provider_name = provider_main_url.replaceFirst("http[s]?://", "").replaceFirst("\\/", "_"); + String provider_json_url = provider_main_url + "/provider.json"; try { String provider_dot_json_string = downloadWithCommercialCA(provider_json_url, danger_on); @@ -500,6 +502,7 @@ public class ProviderAPI extends IntentService { } else { ConfigHelper.saveSharedPref(EIP.ALLOWED_ANON, provider_json.getJSONObject(Provider.SERVICE).getBoolean(EIP.ALLOWED_ANON)); + result.putString(Provider.NAME, added_provider.name()); result.putBoolean(RESULT_KEY, true); result.putString(Provider.KEY, provider_json.toString()); result.putBoolean(ProviderItem.DANGER_ON, danger_on); |