package org.ccci.gto.android.common.okhttp3.util;

import android.support.annotation.NonNull;

import java.util.ArrayList;
import java.util.List;

import okhttp3.Interceptor;
import okhttp3.OkHttpClient;

public class OkHttpClientUtil {
    private static final List<Interceptor> GLOBAL_NETWORK_INTERCEPTORS = new ArrayList<>();

    public static void addGlobalNetworkInterceptor(@NonNull final Interceptor interceptor) {
        GLOBAL_NETWORK_INTERCEPTORS.add(interceptor);
    }

    @NonNull
    public static OkHttpClient.Builder attachGlobalInterceptors(@NonNull final OkHttpClient.Builder builder) {
        for (final Interceptor interceptor : GLOBAL_NETWORK_INTERCEPTORS) {
            builder.addNetworkInterceptor(interceptor);
        }
        return builder;
    }
}

@@ -48,52 +48,8 @@
 l;%0A%0A
-import android.support.annotation.NonNull;%0A%0A
 impo
@@ -96,16 +96,52 @@
 .List;%0A%0A
+import androidx.annotation.NonNull;%0A
 import o

update gto-support-okhttp3 for AndroidX