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

import X.C22428Zd;
import X.C22438Ze;
import X.C25518ec;
import X.C42869Ft;
import X.C42909Fx;
import android.content.Context;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.framework.services.ServiceManager;
import com.ss.android.ugc.aweme.ruler_adapter_api.IRulerService;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import kotlin.h.b.n;

public final class KidsInitRulerTask implements C22438Ze {
    static {
        Covode.recordClassIndex(90501);
    }

    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 C25518ec type() {
        return C25518ec.BACKGROUND;
    }

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

    public final void run(Context context) {
        T t;
        if (context != null) {
            Set<IRulerService> services = ServiceManager.get().getServices(IRulerService.class);
            n.LIZIZ(services, "");
            Iterator<T> it = services.iterator();
            while (true) {
                if (!it.hasNext()) {
                    t = null;
                    break;
                }
                t = it.next();
                if (((IRulerService) t).LIZ()) {
                    break;
                }
            }
            IRulerService iRulerService = (IRulerService) t;
            if (iRulerService != null) {
                iRulerService.LIZ(context);
            }
        }
    }
}
