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

import X.2HX;
import X.AnonymousClass7e4;
import X.AnonymousClass7g9;
import X.AnonymousClass8EV;
import X.AnonymousClass8KJ;
import X.AnonymousClass8KK;
import X.AnonymousClass8KL;
import X.AnonymousClass8KM;
import X.AnonymousClass8KN;
import X.AnonymousClass8KP;
import X.AnonymousClass8KR;
import X.AnonymousClass8KT;
import X.C20708Sn;
import X.C22428Zd;
import X.C22438Ze;
import X.C25348eL;
import X.C25518ec;
import X.C42869Ft;
import X.C42909Fx;
import X.FLI;
import X.MKd;
import X.SfZ;
import android.content.Context;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.ugc.aweme.plugin.service.IPluginService;
import com.ss.android.ugc.aweme.plugin.aab.AabPluginServiceImpl;
import com.ss.mediakit.medialoader.AVMDLDataLoader;
import java.util.List;

public class PlayerKitInitTask implements C22438Ze {
    static {
        Covode.recordClassIndex(90555);
    }

    public boolean meetTrigger() {
        return true;
    }

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

    public boolean serialExecute() {
        return false;
    }

    public int targetProcess() {
        return 1;
    }

    public List triggerOtherLegoComponents() {
        return null;
    }

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

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

    public C25518ec type() {
        return C25518ec.BACKGROUND;
    }

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

    public void run(Context context) {
        2HX.LIZ.LIZ("method_init_player_kit_duration", false);
        if (MKd.LIZIZ()) {
            AVMDLDataLoader.initApplicationContext(FLI.LIZ());
            C20708Sn.LJ(1501, 1);
        }
        C22438Ze LJIJI = TasksHolder.LJIJI();
        2HX.LIZ.LIZIZ("cold_boot_start_to_feed_player", false);
        2HX.LIZ.LIZ("player_init_to_precreate", false);
        C25348eL.LIZ().execute(new AnonymousClass8KJ(LJIJI));
        if (!((Boolean) AnonymousClass8KP.LIZ.getValue()).booleanValue()) {
            AnonymousClass8EV.LIZJ();
        }
        AnonymousClass8KT.LIZ = false;
        AnonymousClass8KT.LIZLLL = new AnonymousClass8KN();
        AnonymousClass7g9.LIZIZ = new AnonymousClass7e4();
        IPluginService LIZJ = AabPluginServiceImpl.LIZJ();
        if (AnonymousClass8KK.LIZ() == 1 && !LIZJ.LIZ(AnonymousClass8EV.LIZ)) {
            AnonymousClass8EV.LIZIZ = SfZ.LJIJ.LJ().LIZLLL(AnonymousClass8KL.LIZ);
        }
        2HX.LIZ.LIZIZ("method_init_player_kit_duration", false);
        if (((Boolean) AnonymousClass8KR.LIZ.getValue()).booleanValue()) {
            SfZ.LJIJ.LJI().LIZLLL(AnonymousClass8KM.LIZ);
        }
    }
}
