package com.bytedance.sdk.openadsdk.duv.fm;

import java.lang.ref.WeakReference;
import org.json.JSONObject;

/* JADX INFO: loaded from: classes2.dex */
public class dsz extends com.bytedance.sdk.component.fm.yz<JSONObject, JSONObject> {
    private WeakReference<com.bytedance.sdk.component.ef.wsy> fm;

    public dsz(com.bytedance.sdk.component.ef.wsy wsyVar) {
        this.fm = new WeakReference<>(wsyVar);
    }

    public static void fm(com.bytedance.sdk.component.fm.fhx fhxVar, com.bytedance.sdk.component.ef.wsy wsyVar) {
        fhxVar.fm("preventTouchEvent", new dsz(wsyVar));
    }

    @Override // com.bytedance.sdk.component.fm.yz
    public JSONObject fm(String str, JSONObject jSONObject, com.bytedance.sdk.component.fm.jnr jnrVar) throws Exception {
        JSONObject jSONObject2 = new JSONObject();
        try {
            boolean zOptBoolean = jSONObject.optBoolean("isPrevent", false);
            com.bytedance.sdk.component.ef.wsy wsyVar = this.fm.get();
            if (wsyVar != null) {
                wsyVar.setIsPreventTouchEvent(zOptBoolean);
                jSONObject2.put("success", true);
            } else {
                jSONObject2.put("success", false);
            }
        } catch (Throwable unused) {
            jSONObject2.put("success", false);
        }
        return jSONObject2;
    }
}
