diff options
author | cyBerta <cyberta@riseup.net> | 2017-10-29 17:08:02 +0100 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2017-10-29 17:08:02 +0100 |
commit | dc0a4511dfd54135aeb1e87dac55ed5644e5ae6b (patch) | |
tree | 51deddbc56ca099043a835d4bfe97424e40da59e /app/src/insecure/java/se/leap | |
parent | c90cede07c8d89c5148c8a5c1625586bf89a3db9 (diff) |
#8757 refactores ProviderAPI for production flavor
Diffstat (limited to 'app/src/insecure/java/se/leap')
-rw-r--r-- | app/src/insecure/java/se/leap/bitmaskclient/ProviderAPI.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/src/insecure/java/se/leap/bitmaskclient/ProviderAPI.java b/app/src/insecure/java/se/leap/bitmaskclient/ProviderAPI.java index 52ca89eb..17e75ce4 100644 --- a/app/src/insecure/java/se/leap/bitmaskclient/ProviderAPI.java +++ b/app/src/insecure/java/se/leap/bitmaskclient/ProviderAPI.java @@ -307,6 +307,7 @@ public class ProviderAPI extends IntentService { initError = getErrorMessageAsJson(getResources().getString(error_io_exception_user_message)); } catch (NoSuchProviderException e) { e.printStackTrace(); + initError = getErrorMessageAsJson(getResources().getString(error_no_such_algorithm_exception_user_message)); } return null; } @@ -632,6 +633,9 @@ public class ProviderAPI extends IntentService { requestBuilder.addHeader(keyValPair.first, keyValPair.second); } } + //TODO: move to getHeaderArgs()? + String locale = Locale.getDefault().getLanguage() + Locale.getDefault().getCountry(); + requestBuilder.addHeader("Accept-Language", locale); Request request = requestBuilder.build(); try { @@ -931,7 +935,6 @@ public class ProviderAPI extends IntentService { * @return an empty string if it fails, the url content if not. */ private String downloadWithProviderCA(String urlString, boolean dangerOn) { - Log.d(TAG, "download with providerCA: " + urlString); JSONObject initError = new JSONObject(); String responseString; |