summaryrefslogtreecommitdiff
path: root/app/src/debug
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2015-04-15 10:41:59 +0200
committerParménides GV <parmegv@sdf.org>2015-04-15 10:42:34 +0200
commitc8994b645b607723bdaba4c2aa1ff0d19a9c0c13 (patch)
tree942129a0870fce168fcb788fa5d7ec21b7fae5bc /app/src/debug
parente522e5e325e6ed19b1316fd251f3c212a2344d7c (diff)
Set accept-language in ProviderAPI, language-country
String locale = Locale.getDefault().getLanguage() + Locale.getDefault().getCountry();
Diffstat (limited to 'app/src/debug')
-rw-r--r--app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java b/app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java
index b0df5ab8..9b5601a9 100644
--- a/app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java
+++ b/app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java
@@ -423,6 +423,8 @@ public class ProviderAPI extends IntentService {
InputStream is = null;
urlConnection = (HttpsURLConnection) new URL(url).openConnection();
urlConnection.setRequestMethod(request_method);
+ String locale = Locale.getDefault().getLanguage() + Locale.getDefault().getCountry();
+ urlConnection.setRequestProperty("Accept-Language", locale);
urlConnection.setChunkedStreamingMode(0);
urlConnection.setSSLSocketFactory(getProviderSSLSocketFactory());