package com.ss.android.legoimpl;

import X.006;
import X.00O;
import X.00i;
import X.00j;
import X.00p;
import X.00s;
import X.2kf;
import X.2nK;
import X.6J4;
import X.8Zd;
import X.8Ze;
import X.8ec;
import X.9Ft;
import X.9Fx;
import X.9Gz;
import X.C0007MEa;
import X.C0022MEp;
import X.MWS;
import X.MWT;
import X.RXb;
import X.TSt;
import android.content.Context;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.abmock.SettingsManager;
import com.ss.android.ugc.aweme.out.AVExternalServiceImpl;
import java.lang.ref.WeakReference;
import java.util.List;

public class ExperienceKitInitTask implements 8Ze {
    static {
        Covode.recordClassIndex(48454);
    }

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

    public boolean serialExecute() {
        return false;
    }

    public int targetProcess() {
        return 1;
    }

    public List triggerOtherLegoComponents() {
        return null;
    }

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

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

    public 8ec type() {
        return 8ec.BACKGROUND;
    }

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

    public boolean meetTrigger() {
        if (9Gz.LIZLLL.LIZIZ()) {
            return false;
        }
        return C0007MEa.LIZ();
    }

    public void run(Context context) {
        2kf.LIZ(3, (String) null, "ExperienceKitInitTask");
        2nK.LIZ("vboost_task_launch", new 6J4().LIZ);
        try {
            00s.LIZ.LIZ(Integer.valueOf(C0022MEp.LIZ()));
            boolean LIZ = C0007MEa.LIZ();
            2kf.LIZ(4, "vboost", "enable:".concat(String.valueOf(LIZ)));
            if (LIZ) {
                00O.LIZJ = SettingsManager.LIZ().LIZ("enable_vboost_vendor_settings", false);
                MWS mws = new MWS();
                if (((Boolean) RXb.LJ.getValue()).booleanValue()) {
                    006.LIZ = mws;
                } else {
                    MWT mwt = MWT.LIZ;
                    00j r2 = 00i.LIZ;
                    r2.LJIIJ.LIZ(new WeakReference(mwt));
                    00p.LIZ.LIZ(r2.LJIIJJI);
                    006.LIZ(mws.LIZ());
                    2kf.LIZIZ(4, "vboost", "registerApplication.");
                    2nK.LIZ("vboost_register_application", new 6J4().LIZ);
                    006.LIZ(mws.LIZLLL());
                }
                AVExternalServiceImpl.LIZ().publishService().setKitManageRegister(true);
            }
        } catch (Throwable th) {
            2kf.LIZIZ(6, "vboost", "registerApplication exception.");
            TSt.LIZ(th);
            00j.LJIIIZ.LIZ(false);
            AVExternalServiceImpl.LIZ().publishService().setKitManageRegister(false);
        }
    }
}
