package com.ss.android.ugc.aweme.external;

import X.6ZR;
import X.AnonymousClass9FH;
import X.AnonymousClass9JE;
import X.AnonymousClass9JF;
import X.C22428Zd;
import X.C22438Ze;
import X.C25518ec;
import X.C29988lp;
import X.C42869Ft;
import X.C42909Fx;
import X.M12;
import X.MK9;
import X.NeH;
import X.TnA;
import android.content.Context;
import com.bytedance.covode.number.Covode;
import java.util.List;

public final class AVCameraInitTask implements AnonymousClass9FH, C22438Ze {
    static {
        Covode.recordClassIndex(75380);
    }

    public final String[] deps() {
        return null;
    }

    public final boolean meetTrigger() {
        return true;
    }

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

    public final boolean serialExecute() {
        return false;
    }

    public final int targetProcess() {
        return 1048575;
    }

    public final List triggerOtherLegoComponents() {
        return null;
    }

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

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

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

    public final C29988lp threadType() {
        if (TnA.LJFF.LIZJ()) {
            return C29988lp.IO;
        }
        return C29988lp.CPU;
    }

    public final int priority() {
        AnonymousClass9JE LIZ;
        if (!MK9.LJI.LIZJ() || (LIZ = AnonymousClass9JF.LIZ.LIZ("shoot_level")) == null || LIZ.LIZIZ() != 3) {
            return 1;
        }
        return 2;
    }

    public final C25518ec type() {
        AnonymousClass9JE LIZ;
        if ((MK9.LJI.LIZJ() || MK9.LJI.LIZLLL()) && (LIZ = AnonymousClass9JF.LIZ.LIZ("shoot_level")) != null) {
            int LIZIZ = LIZ.LIZIZ();
            if (MK9.LJI.LIZJ()) {
                if (LIZIZ == 0) {
                    return C25518ec.APP_BACKGROUND;
                }
            } else if (MK9.LJI.LIZLLL()) {
                if (LIZIZ == 0) {
                    return C25518ec.APP_BACKGROUND;
                }
                if (LIZIZ == 3) {
                    return C25518ec.BACKGROUND;
                }
            }
        }
        return C25518ec.BOOT_FINISH;
    }

    public final void run(Context context) {
        M12.LIZ(context);
        6ZR.LIZLLL("camera preLoad so start");
        6ZR.LIZLLL("camera preLoad so preLoadVESo");
        NeH.LIZIZ.LIZ().preLoadVESo();
        6ZR.LIZLLL("camera preLoad so end");
    }
}
