package com.ss.android.ugc.aweme.hybridkit.task;

import X.8Zd;
import X.8Ze;
import X.8ec;
import X.9Ft;
import X.9Fx;
import X.C0381K1s;
import X.C0382K1t;
import X.C4097LeS;
import X.Hp6;
import X.Hrw;
import X.Hrx;
import X.Htg;
import X.Hti;
import X.Htm;
import X.Htn;
import X.Htq;
import X.KVC;
import X.KXB;
import X.KXH;
import X.KXI;
import X.KXJ;
import X.KXM;
import X.KXN;
import X.KXO;
import X.M12;
import android.content.Context;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.abmock.SettingsManager;
import com.ss.android.ugc.aweme.specact.SpecActServiceImpl;
import java.util.ArrayList;
import java.util.List;

public final class HybridPerformanceInitTask implements 8Ze {
    public static final KXO LIZ = new KXO((byte) 0);

    static {
        Covode.recordClassIndex(83388);
    }

    public final boolean meetTrigger() {
        return true;
    }

    public final String prefix() {
        return "task_";
    }

    public final boolean serialExecute() {
        return false;
    }

    public final int targetProcess() {
        return 1;
    }

    public final List triggerOtherLegoComponents() {
        return null;
    }

    public final 9Ft triggerType() {
        return 8Zd.LIZ(this);
    }

    public final 9Fx scenesType() {
        return 9Fx.DEFAULT;
    }

    public final 8ec type() {
        return 8ec.MAIN;
    }

    public final String key() {
        return getClass().getSimpleName();
    }

    public final void run(Context context) {
        boolean z;
        long j;
        boolean z2;
        boolean z3;
        if (context != null) {
            System.currentTimeMillis();
            C0381K1s k1s = (C0381K1s) SettingsManager.LIZ().LIZ("spark_pre_create_webview", C0381K1s.class, C0382K1t.LIZ);
            if (k1s != null) {
                z = k1s.LIZJ;
            } else {
                z = false;
            }
            C0381K1s k1s2 = (C0381K1s) SettingsManager.LIZ().LIZ("spark_pre_create_webview", C0381K1s.class, C0382K1t.LIZ);
            if (k1s2 != null) {
                j = k1s2.LJ;
            } else {
                j = 0;
            }
            int i = (int) j;
            if (SpecActServiceImpl.LJIJJ().LJIILJJIL()) {
                if (i <= 0) {
                    i = 1;
                }
                z = true;
            }
            KXI kxi = new KXI();
            KXN kxn = new KXN();
            kxn.LIZ = i;
            kxn.LIZIZ = z;
            C0381K1s k1s3 = (C0381K1s) SettingsManager.LIZ().LIZ("spark_pre_create_webview", C0381K1s.class, C0382K1t.LIZ);
            if (k1s3 != null) {
                z2 = k1s3.LIZIZ;
            } else {
                z2 = false;
            }
            kxn.LIZJ = z2;
            C0381K1s k1s4 = (C0381K1s) SettingsManager.LIZ().LIZ("spark_pre_create_webview", C0381K1s.class, C0382K1t.LIZ);
            if (k1s4 != null) {
                z3 = k1s4.LIZ;
            } else {
                z3 = false;
            }
            kxn.LIZLLL = z3;
            kxi.LIZ = kxn;
            M12.LIZ((Object) context, (Object) kxi);
            KXH.LIZIZ = kxi;
            KXN kxn2 = kxi.LIZ;
            if (kxn2 != null && kxn2.LIZIZ) {
                KXB kxb = KXB.LIZ;
                kxb.LIZ(context);
                kxb.LIZ(KXJ.LIZ);
                String str = KXH.LIZ;
                KVC kvc = new KVC();
                kvc.LIZ = new KXM(kxn2);
                kvc.LIZIZ = kxn2.LIZ;
                kvc.LIZJ = true;
                kxb.LIZ(str, kvc.LIZ());
            }
            Htg htg = Hti.LIZIZ;
            Hp6 hp6 = new Hp6();
            hp6.LIZ = false;
            hp6.LIZ("");
            hp6.LIZJ = Integer.MAX_VALUE;
            hp6.LJ = Integer.MAX_VALUE;
            hp6.LJI = Hrw.LIZ;
            hp6.LJII = new ArrayList();
            hp6.LJIIIIZZ = C4097LeS.LIZLLL("*");
            htg.LIZ(hp6);
            SpecActServiceImpl.LJIJJ().LJIIJJI();
            Htm htm = Htn.LIZIZ;
            Htq htq = new Htq();
            htq.LIZ = false;
            htq.LIZJ = Integer.MAX_VALUE;
            htq.LIZ("");
            htq.LJ = Integer.MAX_VALUE;
            htq.LIZ(Hrx.LIZ);
            htq.LJII = new ArrayList();
            htq.LJIIIIZZ = C4097LeS.LIZLLL("*");
            htm.LIZ(htq);
            SpecActServiceImpl.LJIJJ().LJIILIIL();
        }
    }
}
