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

import X.8Zd;
import X.8Ze;
import X.8ec;
import X.8vV;
import X.9Ft;
import X.9Fx;
import X.AnonymousClass2VO;
import X.AnonymousClass2VT;
import X.AnonymousClass2VU;
import X.AnonymousClass2VV;
import X.M12;
import android.content.Context;
import android.text.TextUtils;
import com.bytedance.covode.number.Covode;
import com.ss.android.deviceregister.DeviceRegisterManager;
import com.ss.android.ugc.aweme.AccountService;
import com.ss.android.ugc.aweme.IAccountUserService;
import com.ss.android.ugc.aweme.plugin.PluginService;
import java.util.List;
import kotlin.h.b.n;

public final class PluginInitTask implements 8Ze {
    public static final AnonymousClass2VV LIZ = new AnonymousClass2VV((byte) 0);
    public static final 8vV LIZIZ = new AnonymousClass2VT();

    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.BACKGROUND;
    }

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

    static {
        Covode.recordClassIndex(90842);
    }

    public final void run(Context context) {
        M12.LIZ(context);
        PluginService.createIPluginServicebyMonsterPlugin(false).tryInit();
        if (TextUtils.isEmpty(DeviceRegisterManager.getDeviceId())) {
            AnonymousClass2VO.LIZ(PluginService.createIPluginServicebyMonsterPlugin(false), (Boolean) null, true, context, 7);
            DeviceRegisterManager.addOnDeviceConfigUpdateListener(LIZIZ);
        } else {
            IAccountUserService LJFF = AccountService.LIZ().LJFF();
            n.LIZIZ(LJFF, "");
            if (!LJFF.isLogin()) {
                AnonymousClass2VO.LIZ(PluginService.createIPluginServicebyMonsterPlugin(false), (Boolean) null, (Boolean) null, (Context) null, 31);
            }
        }
        AccountService.LIZ().LIZ(AnonymousClass2VU.LIZ);
        PluginService.createIPluginServicebyMonsterPlugin(false).initRealtimeFeedbackInterceptor();
    }
}
