package com.ss.android.ugc.aweme.portrait.impl;

import X.8eL;
import X.9EH;
import X.9Y3;
import X.C0648PJt;
import X.C2087PqO;
import X.C2093PqU;
import X.C2094PqV;
import X.C2101Pqc;
import X.C2110Pql;
import X.C2112Pqn;
import X.C2113Pqo;
import X.C2114Pqp;
import X.C2124Pqz;
import X.Lnj;
import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;
import com.ss.android.ugc.aweme.portrait.api.IPortraitCenterInitService;
import com.ss.android.ugc.aweme.portrait.api.PortraitCenterInitService;

public final class PortraitCenterInitServiceImpl extends PortraitCenterInitService {
    static {
        Covode.recordClassIndex(98077);
    }

    public static IPortraitCenterInitService LIZ() {
        MethodCollector.i(11671);
        IPortraitCenterInitService iPortraitCenterInitService = (IPortraitCenterInitService) Lnj.LIZ(IPortraitCenterInitService.class, false);
        if (iPortraitCenterInitService != null) {
            MethodCollector.o(11671);
            return iPortraitCenterInitService;
        }
        Object LIZIZ = Lnj.LIZIZ(IPortraitCenterInitService.class, false);
        if (LIZIZ != null) {
            IPortraitCenterInitService iPortraitCenterInitService2 = (IPortraitCenterInitService) LIZIZ;
            MethodCollector.o(11671);
            return iPortraitCenterInitService2;
        }
        if (Lnj.Q == null) {
            synchronized (IPortraitCenterInitService.class) {
                try {
                    if (Lnj.Q == null) {
                        Lnj.Q = new PortraitCenterInitServiceImpl();
                    }
                } catch (Throwable th) {
                    MethodCollector.o(11671);
                    throw th;
                }
            }
        }
        PortraitCenterInitService portraitCenterInitService = (PortraitCenterInitService) Lnj.Q;
        MethodCollector.o(11671);
        return portraitCenterInitService;
    }

    public final void checkAndInit() {
        C2087PqO.LIZ = C2114Pqp.LIZ;
        if (C2114Pqp.LIZ) {
            System.currentTimeMillis();
        }
        if (9Y3.LIZ(9Y3.LIZ(), true, "client_portrait_center_switch", false)) {
            C2124Pqz.LIZ = C2110Pql.LIZ;
            C2094PqV.LIZ = C0648PJt.LIZ;
            C2093PqU.LIZ = C2113Pqo.LIZ;
            C2101Pqc.LIZ.LIZ().LIZ(9EH.LJJIFFI.LIZ(), 8eL.LIZLLL());
            C2101Pqc.LIZ.LIZ().LIZ(C2112Pqn.LIZ);
        }
        if (C2114Pqp.LIZ) {
            System.currentTimeMillis();
        }
    }
}
