diff options
author | Parménides GV <parmegv@sdf.org> | 2013-10-14 13:08:22 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2013-12-09 18:54:33 +0100 |
commit | 7f351332e7f308b52bbdded5e3df6a9c2c0d01e3 (patch) | |
tree | 2ec79578908bcdf6cf001c3193eea0f1724bd927 /src/se/leap/bitmaskclient/ProviderAPI.java | |
parent | b001f59fcbc30112ce04891fbca4c1365b457813 (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 268275e2..8542aa92 100644 --- a/src/se/leap/bitmaskclient/ProviderAPI.java +++ b/src/se/leap/bitmaskclient/ProviderAPI.java @@ -488,7 +488,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); @@ -503,6 +505,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); |