1
0
mirror of https://github.com/owncloud/android-library.git synced 2025-06-07 16:06:08 +00:00

fix usage of debug interceptor

This commit is contained in:
Christian Schabesberger 2021-10-08 14:51:51 +02:00 committed by Abel García de Prada
parent 7e507abf32
commit 85a3918ff1

View File

@ -31,6 +31,7 @@ import com.owncloud.android.lib.common.network.NetworkUtils;
import okhttp3.Cookie; import okhttp3.Cookie;
import okhttp3.CookieJar; import okhttp3.CookieJar;
import okhttp3.HttpUrl; import okhttp3.HttpUrl;
import okhttp3.Interceptor;
import okhttp3.OkHttpClient; import okhttp3.OkHttpClient;
import okhttp3.Protocol; import okhttp3.Protocol;
import okhttp3.TlsVersion; import okhttp3.TlsVersion;
@ -58,7 +59,7 @@ public class HttpClient {
private static Context sContext; private static Context sContext;
private static HashMap<String, List<Cookie>> sCookieStore = new HashMap<>(); private static HashMap<String, List<Cookie>> sCookieStore = new HashMap<>();
private static LogInterceptor sLogInterceptor; private static LogInterceptor sLogInterceptor;
private static DebugInterceptor sDebugInterceptor; private static Interceptor sDebugInterceptor;
public static OkHttpClient getOkHttpClient() { public static OkHttpClient getOkHttpClient() {
if (sOkHttpClient == null) { if (sOkHttpClient == null) {
@ -131,13 +132,6 @@ public class HttpClient {
return sLogInterceptor; return sLogInterceptor;
} }
public static DebugInterceptor getDebugInterceptor() {
if (sDebugInterceptor == null) {
sDebugInterceptor = new DebugInterceptor();
}
return sDebugInterceptor;
}
public static List<Cookie> getCookiesFromUrl(HttpUrl httpUrl) { public static List<Cookie> getCookiesFromUrl(HttpUrl httpUrl) {
return sCookieStore.get(httpUrl.host()); return sCookieStore.get(httpUrl.host());
} }