summaryrefslogtreecommitdiff
path: root/app/src/insecure/java/se
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2017-10-29 17:08:02 +0100
committercyBerta <cyberta@riseup.net>2017-10-29 17:08:02 +0100
commitdc0a4511dfd54135aeb1e87dac55ed5644e5ae6b (patch)
tree51deddbc56ca099043a835d4bfe97424e40da59e /app/src/insecure/java/se
parentc90cede07c8d89c5148c8a5c1625586bf89a3db9 (diff)
#8757 refactores ProviderAPI for production flavor
Diffstat (limited to 'app/src/insecure/java/se')
-rw-r--r--app/src/insecure/java/se/leap/bitmaskclient/ProviderAPI.java5
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;