From dc0a4511dfd54135aeb1e87dac55ed5644e5ae6b Mon Sep 17 00:00:00 2001 From: cyBerta Date: Sun, 29 Oct 2017 17:08:02 +0100 Subject: #8757 refactores ProviderAPI for production flavor --- app/src/insecure/java/se/leap/bitmaskclient/ProviderAPI.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/src/insecure') 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; -- cgit v1.2.3