package com.ss.android.ugc.aweme.utils;

import X.0RP;
import X.0RQ;
import X.LsC;
import X.Q39;
import com.bytedance.covode.number.Covode;
import com.bytedance.pitaya.api.PTYTaskResultCallback;
import com.bytedance.pitaya.api.bean.PTYError;
import com.bytedance.pitaya.api.bean.PTYPackageInfo;
import com.bytedance.pitaya.api.bean.PTYTaskData;
import org.json.JSONObject;

public final class AdMobileAISecServiceImpl$checkPornScene$1 implements PTYTaskResultCallback {
    public final /* synthetic */ LsC $callback;

    static {
        Covode.recordClassIndex(122027);
    }

    public AdMobileAISecServiceImpl$checkPornScene$1(LsC lsC) {
        this.$callback = lsC;
    }

    public final void onResult(boolean z, PTYError pTYError, PTYTaskData pTYTaskData, PTYPackageInfo pTYPackageInfo) {
        JSONObject jSONObject;
        if (!z && pTYError != null) {
            Integer.valueOf(pTYError.getCode());
            pTYError.getSummary();
            pTYError.getStacks();
        }
        LsC lsC = this.$callback;
        0RP r3 = null;
        if (pTYTaskData != null) {
            jSONObject = pTYTaskData.getParams();
        } else {
            jSONObject = null;
        }
        if (pTYError != null) {
            int code = pTYError.getCode();
            String summary = pTYError.getSummary();
            if (summary == null) {
                summary = Q39.LIZJ;
            }
            r3 = new 0RP(code, summary);
        }
        lsC.invoke(new 0RQ(z, jSONObject, r3));
    }
}
