mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Only do http logging if a debug build is run (#1795)
This commit is contained in:
parent
d29aa2e2e5
commit
ff9f43ef8b
1 changed files with 3 additions and 1 deletions
|
|
@ -94,7 +94,9 @@ public class ApacheHttpClientMediaWikiApi implements MediaWikiApi {
|
|||
ClientConnectionManager cm = new ThreadSafeClientConnManager(params, schemeRegistry);
|
||||
params.setParameter(CoreProtocolPNames.USER_AGENT, getUserAgent());
|
||||
httpClient = new DefaultHttpClient(cm, params);
|
||||
httpClient.addRequestInterceptor(NetworkInterceptors.getHttpRequestInterceptor());
|
||||
if (BuildConfig.DEBUG) {
|
||||
httpClient.addRequestInterceptor(NetworkInterceptors.getHttpRequestInterceptor());
|
||||
}
|
||||
api = new MWApi(apiURL, httpClient);
|
||||
wikidataApi = new MWApi(wikidatApiURL, httpClient);
|
||||
this.defaultPreferences = defaultPreferences;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue