package com.ss.android.ugc.aweme.ecommerce.mall.preload;

import X.1hK;
import X.49h;
import X.8Zd;
import X.8Ze;
import X.8ec;
import X.9Ft;
import X.9Fx;
import X.9Y3;
import X.C0314P6x;
import X.Lqq;
import X.MEH;
import X.SfZ;
import android.content.Context;
import android.os.Bundle;
import com.bytedance.covode.number.Covode;
import com.bytedance.hox.Hox;
import com.ss.android.ugc.aweme.main.TabChangeManager;
import java.util.List;
import kotlin.h.b.n;

public final class ECColdStartFetchTask implements 8Ze {
    public static final C0314P6x LIZ = new C0314P6x((byte) 0);

    static {
        Covode.recordClassIndex(70424);
    }

    public final boolean meetTrigger() {
        return true;
    }

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

    public final boolean serialExecute() {
        return false;
    }

    public final int targetProcess() {
        return 1;
    }

    public final List triggerOtherLegoComponents() {
        return null;
    }

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

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

    public final 8ec type() {
        return 8ec.BOOT_FINISH;
    }

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

    public final void run(Context context) {
        1hK LJIIIZ;
        if (9Y3.LIZ(9Y3.LIZ(), true, "mall_prefetch_type", 0) == 1 && (LJIIIZ = SfZ.LJIJ.LJIIIZ()) != null && (LJIIIZ instanceof 49h) && (LJIIIZ instanceof 1hK)) {
            1hK r3 = LJIIIZ;
            if (!(!n.LIZ(TabChangeManager.LJII.LIZ(r3).LIZLLL, "SHOP_MALL"))) {
                return;
            }
            if (n.LIZ("HOME", TabChangeManager.LJII.LIZ(r3).LIZLLL) && Hox.LJ.LIZ(r3).LIZJ("Shop")) {
                return;
            }
            if (MEH.LIZ.LIZ()) {
                if (!Lqq.LIZ.LIZIZ()) {
                    ShopMainDataPreload.Companion.LIZ(new Bundle());
                }
            } else if (!Lqq.LIZ.LJII()) {
                Bundle bundle = new Bundle();
                bundle.putBoolean("is_prefetch", true);
                MallMainDataPreload.Companion.LIZ(bundle);
                MallMainRecommendPreload.Companion.LIZ(bundle);
            }
        }
    }
}
