package com.ss.android.ugc.aweme.ecommerce.common;

import X.9fW;
import X.C3092JKx;
import X.Lnj;
import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;
import com.ss.android.ugc.aweme.ecommerce.ab.EcomNetworkInterceptorSwitch;
import com.ss.android.ugc.aweme.ecommerce.service.IEcommerceBystanderProvider;

public final class EcommerceBystanderProvider implements IEcommerceBystanderProvider {
    static {
        Covode.recordClassIndex(69760);
    }

    public final 9fW LIZ() {
        if (EcomNetworkInterceptorSwitch.LIZ().getSwitch()) {
            return new C3092JKx();
        }
        return null;
    }

    public static IEcommerceBystanderProvider LIZIZ() {
        MethodCollector.i(1776);
        IEcommerceBystanderProvider iEcommerceBystanderProvider = (IEcommerceBystanderProvider) Lnj.LIZ(IEcommerceBystanderProvider.class, false);
        if (iEcommerceBystanderProvider != null) {
            MethodCollector.o(1776);
            return iEcommerceBystanderProvider;
        }
        Object LIZIZ = Lnj.LIZIZ(IEcommerceBystanderProvider.class, false);
        if (LIZIZ != null) {
            IEcommerceBystanderProvider iEcommerceBystanderProvider2 = (IEcommerceBystanderProvider) LIZIZ;
            MethodCollector.o(1776);
            return iEcommerceBystanderProvider2;
        }
        if (Lnj.LLJJIJI == null) {
            synchronized (IEcommerceBystanderProvider.class) {
                try {
                    if (Lnj.LLJJIJI == null) {
                        Lnj.LLJJIJI = new EcommerceBystanderProvider();
                    }
                } catch (Throwable th) {
                    MethodCollector.o(1776);
                    throw th;
                }
            }
        }
        EcommerceBystanderProvider ecommerceBystanderProvider = (EcommerceBystanderProvider) Lnj.LLJJIJI;
        MethodCollector.o(1776);
        return ecommerceBystanderProvider;
    }
}
