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

import X.2ms;
import X.7fl;
import X.7fp;
import X.7ku;
import X.8eL;
import X.8ew;
import X.9Fh;
import X.9Fi;
import X.C2844DwO;
import X.C5061Er3;
import X.C5265EuL;
import X.F7S;
import X.LDj;
import X.LOH;
import X.MKE;
import X.MLy;
import X.Qeg;
import X.RXQ;
import X.RXs;
import X.T9Q;
import X.TmH;
import X.Tnh;
import X.To0;
import android.content.Context;
import android.view.Choreographer;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.arch.widgets.base.WidgetManager;
import com.ss.android.ugc.aweme.crossplatform.activity.CrossPlatformActivity;
import com.ss.android.ugc.aweme.detail.ui.DetailActivity;
import com.ss.android.ugc.aweme.feed.ui.FeedRecommendFragment;
import com.ss.android.ugc.aweme.main.MainFragment;
import com.ss.android.ugc.aweme.out.AVExternalServiceImpl;
import com.ss.android.ugc.aweme.services.ProfileDependentComponentImpl;
import com.ss.android.ugc.aweme.specact.SpecActServiceImpl;
import com.ss.android.ugc.aweme.sticker.StickerServiceImpl;

public class PreloadInstanceMainActTask extends PreloadInstanceTask {
    static {
        Covode.recordClassIndex(90566);
    }

    public String key() {
        return "PreloadInstanceMainActTask";
    }

    public void run(Context context) {
        if (((Boolean) Tnh.LJIILIIL.getValue()).booleanValue()) {
            Boolean.valueOf(F7S.LIZ);
        }
        ((Boolean) Tnh.LJIILL.getValue()).booleanValue();
        if (((Boolean) Tnh.LJIILLIIL.getValue()).booleanValue()) {
            Long.valueOf(7fl.LIZ(7fp.LIZIZ(Choreographer.class, "mHandler")));
        }
        ((Boolean) Tnh.LJIIZILJ.getValue()).booleanValue();
        ((Boolean) Tnh.LJIJ.getValue()).booleanValue();
        if (RXQ.LIZIZ.LIZIZ()) {
            9Fh r0 = 9Fh.LJIILIIL;
            new 9Fi().LIZ(new 1(this));
        } else {
            8ew.LIZ(context);
        }
        Boolean.valueOf(DetailActivity.LIZJ);
        Boolean.valueOf(CrossPlatformActivity.LIZIZ);
        C5061Er3.LIZ.LJI();
        try {
            if (!7ku.LJJIII.LJIIJJI()) {
                new C5265EuL(context);
                new T9Q(context);
                new Qeg(context);
                new MainFragment();
                new FeedRecommendFragment();
            }
        } catch (Throwable unused) {
        }
        LDj.LJII();
        ((Boolean) MKE.LJI.getValue()).booleanValue();
        ProfileDependentComponentImpl.createIProfileDependentComponentServicebyMonsterPlugin(false);
        StickerServiceImpl.LIZIZ().LIZ();
        new WidgetManager();
        Boolean.valueOf(true);
        LOH.LJ();
        if (((Boolean) To0.LJIJI.getValue()).booleanValue()) {
            SpecActServiceImpl.LJIJJ();
            AVExternalServiceImpl.LIZ().publishService();
        }
        if (((Boolean) TmH.LIZ.getValue()).booleanValue()) {
            8eL.LIZJ();
        }
        if (((Boolean) RXs.LIZJ.getValue()).booleanValue()) {
            Boolean.valueOf(C2844DwO.LIZ.LJIIIIZZ());
        }
        if (((Boolean) MLy.LIZJ.getValue()).booleanValue()) {
            2ms.LIZ();
        }
    }
}
