mirror of
				https://github.com/owncloud/android-library.git
				synced 2025-10-31 02:17:41 +00:00 
			
		
		
		
	Add log interceptor disabled by default
This commit is contained in:
		
							parent
							
								
									b7fd663d77
								
							
						
					
					
						commit
						dc39475760
					
				| @ -26,7 +26,6 @@ package com.owncloud.android.lib.common.http; | ||||
| 
 | ||||
| import android.content.Context; | ||||
| 
 | ||||
| import com.owncloud.android.lib.BuildConfig; | ||||
| import com.owncloud.android.lib.common.network.AdvancedX509TrustManager; | ||||
| import com.owncloud.android.lib.common.network.NetworkUtils; | ||||
| import okhttp3.Cookie; | ||||
| @ -112,6 +111,7 @@ public class HttpClient { | ||||
|                 }; | ||||
| 
 | ||||
|                 OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder() | ||||
|                         .addInterceptor(getLogInterceptor()) | ||||
|                         .protocols(Arrays.asList(Protocol.HTTP_1_1)) | ||||
|                         .readTimeout(HttpConstants.DEFAULT_DATA_TIMEOUT, TimeUnit.MILLISECONDS) | ||||
|                         .writeTimeout(HttpConstants.DEFAULT_DATA_TIMEOUT, TimeUnit.MILLISECONDS) | ||||
| @ -123,11 +123,6 @@ public class HttpClient { | ||||
|                 // TODO: Not verifying the hostname against certificate. ask owncloud security human if this is ok. | ||||
|                 //.hostnameVerifier(new BrowserCompatHostnameVerifier()); | ||||
| 
 | ||||
|                 // Http logs enabled only in debug version. TODO: Add an option to enable and disable it. | ||||
|                 if (BuildConfig.DEBUG) { | ||||
|                     clientBuilder.addInterceptor(getLogInterceptor()); | ||||
|                 } | ||||
| 
 | ||||
|                 sOkHttpClient = clientBuilder.build(); | ||||
| 
 | ||||
|             } catch (Exception e) { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user