package com.ss.android.ugc.aweme.main;

import X.0Gp;
import X.2GH;
import X.2Pr;
import X.4Cy;
import X.7he;
import X.8bl;
import X.8eL;
import X.9H6;
import X.C0295Crj;
import X.C3648EMi;
import X.C4836EnQ;
import X.C5982FEc;
import X.FEV;
import X.FEW;
import X.FEX;
import X.FEY;
import X.FEZ;
import X.Ls2;
import X.M12;
import android.os.SystemClock;
import com.bytedance.covode.number.Covode;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicBoolean;

public final class PerformanceOptAssem extends C4836EnQ implements C3648EMi, IPerformanceAbility {
    public final C0295Crj LJFF = 7he.LIZ(FEV.LIZ);
    public final C0295Crj LJI = 7he.LIZ(FEW.LIZ);

    static {
        Covode.recordClassIndex(91639);
    }

    public final CopyOnWriteArrayList<Ls2<2Pr>> LJIJJ() {
        return (CopyOnWriteArrayList) this.LJFF.getValue();
    }

    public final 2GH d_(String str) {
        if (str.hashCode() != -1222730094) {
            return null;
        }
        return this;
    }

    public final void cZ_() {
        long uptimeMillis = SystemClock.uptimeMillis();
        super.cZ_();
        8bl.LIZ(new FEY(this), 10000);
        4Cy.LIZ(getClass().getCanonicalName(), SystemClock.uptimeMillis() - uptimeMillis, "ON_CREATE", (String) null);
    }

    public final void LJIJJLI() {
        if (!((AtomicBoolean) this.LJI.getValue()).compareAndSet(false, true)) {
            return;
        }
        if ((9H6.LJIIIZ.LIZ() & 9H6.LIZIZ) == 9H6.LIZIZ) {
            0Gp.LIZ(800).LIZIZ(new FEZ(this), 8eL.LIZJ());
        } else {
            0Gp.LIZ(1800).LIZIZ(new C5982FEc(this), 8eL.LIZJ());
        }
    }

    public final void LIZ(Ls2<2Pr> ls2) {
        M12.LIZ(ls2);
        LJIJJ().add(ls2);
    }

    public final void LIZ(boolean z, boolean z2) {
        super.LIZ(z, z2);
        if (z && z2) {
            8bl.LIZ(new FEX(this), 300);
        }
    }
}
