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

import X.38l;
import X.46i;
import X.AnonymousClass9FG;
import X.AnonymousClass9H6;
import X.C05477ku;
import X.C07237qE;
import X.C22428Zd;
import X.C22438Ze;
import X.C25518ec;
import X.C29988lp;
import X.C42869Ft;
import X.C42909Fx;
import X.C43189Gz;
import X.IMk;
import android.content.Context;
import androidx.fragment.app.Fragment;
import com.bytedance.covode.number.Covode;
import com.bytedance.keva.Keva;
import com.ss.android.ugc.aweme.account.experiment.service.NonPersonalizationService;
import com.ss.android.ugc.aweme.feed.ui.FeedRecommendFragment;
import com.ss.android.ugc.aweme.follow.service.FollowFeedServiceImpl;
import com.ss.android.ugc.aweme.out.AVExternalServiceImpl;
import com.ss.android.ugc.aweme.services.MandatoryLoginService;
import java.util.List;

public class ColdBootPreloadInstanceTask implements AnonymousClass9FG, C22438Ze {
    public static final ColdBootPreloadInstanceTask LIZ = new ColdBootPreloadInstanceTask();
    public Fragment LIZIZ;
    public Fragment LIZJ;
    public long LIZLLL = 500;

    public final boolean LIZ() {
        return true;
    }

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

    public boolean serialExecute() {
        return false;
    }

    public int targetProcess() {
        return 1048575;
    }

    public List triggerOtherLegoComponents() {
        return null;
    }

    public C42869Ft triggerType() {
        return C22428Zd.LIZ(this);
    }

    public final long LIZIZ() {
        return this.LIZLLL;
    }

    public C42909Fx scenesType() {
        return C42909Fx.DEFAULT;
    }

    public C29988lp threadType() {
        return C29988lp.CPU;
    }

    static {
        Covode.recordClassIndex(90416);
    }

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

    public boolean meetTrigger() {
        if (C43189Gz.LIZLLL.LIZIZ()) {
            return false;
        }
        return true;
    }

    public C25518ec type() {
        if ((AnonymousClass9H6.LJIIIZ.LIZ() & AnonymousClass9H6.LJ) == AnonymousClass9H6.LJ) {
            return C25518ec.IDLE;
        }
        return C25518ec.BACKGROUND;
    }

    public final void LIZ(Long l) {
        this.LIZLLL = l.longValue();
    }

    public void run(Context context) {
        C05477ku.LJJIII.LJIIJJI();
        if (C07237qE.LJI.LJ()) {
            AVExternalServiceImpl.LIZ().specialPlusService();
        }
        if (C07237qE.LJI.LJI()) {
            this.LIZIZ = new FeedRecommendFragment();
        }
        if (C07237qE.LJI.LJII()) {
            this.LIZJ = FollowFeedServiceImpl.LIZJ().LIZIZ();
        }
        if (((Boolean) C05477ku.LJIIIZ.getValue()).booleanValue() && IMk.LJ) {
            try {
                38l.LJIIL.LIZ().LJII();
            } catch (Throwable unused) {
            }
        }
        if (((Boolean) C05477ku.LJIIJ.getValue()).booleanValue()) {
            try {
                NonPersonalizationService.LJIIJ();
                MandatoryLoginService.createIMandatoryLoginServicebyMonsterPlugin(false);
            } catch (Throwable unused2) {
            }
        }
        if (((Boolean) C05477ku.LJIIJJI.getValue()).booleanValue()) {
            try {
                Keva.getRepo("repo_story_collection_swipe_guide").getAll();
            } catch (Throwable unused3) {
            }
        }
        if (((Boolean) C05477ku.LJJII.getValue()).booleanValue()) {
            try {
                46i.LJFF();
            } catch (Throwable unused4) {
            }
        }
    }
}
