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

import X.0HH;
import X.AnonymousClass9VI;
import X.C22428Zd;
import X.C22438Ze;
import X.C25518ec;
import X.C42869Ft;
import X.C42909Fx;
import X.C45659Qm;
import X.C46399Ti;
import X.C46699Um;
import X.ESC;
import android.content.Context;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.zerorating.ZeroRatingServiceImpl;
import java.util.List;

public class ZeroRatingTask implements C22438Ze {
    public boolean LIZ = true;

    static {
        Covode.recordClassIndex(90675);
    }

    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) {
        if (AnonymousClass9VI.LIZ() && !ESC.LIZLLL()) {
            ZeroRatingServiceImpl.LJFF().LIZ();
            try {
                C45659Qm r1 = (C45659Qm) C46399Ti.LIZ(C45659Qm.class);
                if (r1 != null) {
                    r1.LIZ(new C46699Um() {
                        static {
                            Covode.recordClassIndex(90676);
                        }

                        public final void LIZIZ() {
                            ZeroRatingServiceImpl.LJFF().LJ();
                        }

                        public final void LIZ() {
                            if (ZeroRatingTask.this.LIZ) {
                                ZeroRatingTask.this.LIZ = false;
                            } else {
                                ZeroRatingServiceImpl.LJFF().LIZLLL();
                            }
                        }
                    });
                }
            } catch (Exception e) {
                0HH.LIZ(e);
            }
        }
    }
}
