package com.bytedance.sdk.openadsdk.gof;

import android.content.Context;
import android.text.TextUtils;
import com.bytedance.sdk.component.utils.gof;
import com.bytedance.sdk.openadsdk.BuildConfig;
import com.bytedance.sdk.openadsdk.core.fhx;
import com.bytedance.sdk.openadsdk.core.vt;
import org.json.JSONObject;

/* JADX INFO: loaded from: classes2.dex */
class jnr implements yz {
    private int fm;
    private int jnr;

    /* JADX INFO: renamed from: lb, reason: collision with root package name */
    private int f7410lb;
    private yz ro;
    private int yz;

    public jnr(yz yzVar, int i10, int i11, int i12) {
        this.fm = Integer.MIN_VALUE;
        this.ro = yzVar;
        this.f7410lb = i10;
        this.yz = i11;
        this.jnr = i12;
        Context contextFm = fm.fm();
        if (contextFm != null) {
            this.fm = gof.lb(contextFm);
        }
    }

    @Override // com.bytedance.sdk.openadsdk.gof.yz
    public com.bytedance.sdk.openadsdk.gof.ro.fm fm() {
        com.bytedance.sdk.openadsdk.gof.ro.fm fmVarFm = this.ro.fm();
        fmVarFm.fm(BuildConfig.VERSION_NAME);
        fmVarFm.fm(this.f7410lb);
        fmVarFm.ro(this.yz);
        fmVarFm.lb(this.jnr);
        fmVarFm.ajl(vt.ro().wsy());
        fmVarFm.yz(fhx.yz());
        String strLb = fmVarFm.lb();
        if (this.fm != Integer.MIN_VALUE && ("get_ad".equals(strLb) || "dislike".equals(strLb) || "settings_fetch".equals(strLb) || "reward".equals(strLb) || "strategy_fetch".equals(strLb))) {
            try {
                String strDsz = fmVarFm.dsz();
                JSONObject jSONObject = TextUtils.isEmpty(strDsz) ? new JSONObject() : new JSONObject(strDsz);
                jSONObject.put("nt", this.fm);
                fmVarFm.wsy(jSONObject.toString());
            } catch (Throwable unused) {
            }
        }
        return fmVarFm;
    }
}
