Skip to content

Commit ff9f43e

Browse files
misaochanVivek Maskara
authored and
Vivek Maskara
committed
Only do http logging if a debug build is run (#1795)
1 parent d29aa2e commit ff9f43e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/src/main/java/fr/free/nrw/commons/mwapi/ApacheHttpClientMediaWikiApi.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ public ApacheHttpClientMediaWikiApi(Context context,
9494
ClientConnectionManager cm = new ThreadSafeClientConnManager(params, schemeRegistry);
9595
params.setParameter(CoreProtocolPNames.USER_AGENT, getUserAgent());
9696
httpClient = new DefaultHttpClient(cm, params);
97-
httpClient.addRequestInterceptor(NetworkInterceptors.getHttpRequestInterceptor());
97+
if (BuildConfig.DEBUG) {
98+
httpClient.addRequestInterceptor(NetworkInterceptors.getHttpRequestInterceptor());
99+
}
98100
api = new MWApi(apiURL, httpClient);
99101
wikidataApi = new MWApi(wikidatApiURL, httpClient);
100102
this.defaultPreferences = defaultPreferences;

0 commit comments

Comments
 (0)