package com.ss.android.ugc.aweme.requesttask.idle;

import X.2kf;
import X.AnonymousClass7jM;
import X.C22428Zd;
import X.C22438Ze;
import X.C25518ec;
import X.C403195y;
import X.C42869Ft;
import X.C42909Fx;
import X.M12;
import android.content.Context;
import android.os.Bundle;
import com.bytedance.covode.number.Covode;
import java.util.List;
import org.json.JSONObject;

public final class ReportActivityStatusTask implements C22438Ze {
    public final String LIZ;
    public final Bundle LIZIZ;

    static {
        Covode.recordClassIndex(103797);
    }

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

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

    public final void run(Context context) {
        boolean z;
        String str = this.LIZ;
        int i = 1;
        if (this.LIZIZ != null) {
            z = true;
        } else {
            z = false;
        }
        AnonymousClass7jM r6 = new AnonymousClass7jM(str, z);
        try {
            String str2 = r6.LIZ;
            2kf.LIZIZ(4, str2, "The activity is recovered by the system or config change:" + r6.LIZIZ);
            if (!r6.LIZIZ) {
                i = 0;
            }
            JSONObject jSONObject = new JSONObject();
            jSONObject.put("activity", r6.LIZ);
            StringBuilder sb = new StringBuilder();
            sb.append(r6.LIZIZ);
            jSONObject.put("activity_status", sb.toString());
            C403195y.LIZ("activity_monitor", i, jSONObject);
        } catch (Throwable th) {
            2kf.LIZ(th);
        }
    }

    public ReportActivityStatusTask(String str, Bundle bundle) {
        M12.LIZ(str);
        this.LIZ = str;
        this.LIZIZ = bundle;
    }
}
