package com.ss.android.ugc.aweme.fe.method.incentive;

import X.0CB;
import X.0CH;
import X.6Is;
import X.AnonymousClass412;
import X.FIu;
import X.KKi;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.fe.base.BaseCommonJavaMethod;
import com.ss.android.ugc.aweme.ug.UgCommonServiceImpl;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import kotlin.h.b.n;
import org.json.JSONObject;

public final class AppsFlyerAttributionMethod extends BaseCommonJavaMethod implements 6Is {
    public static final AnonymousClass412 LIZ = new AnonymousClass412((byte) 0);

    static {
        Covode.recordClassIndex(76259);
    }

    public AppsFlyerAttributionMethod(byte b) {
        this();
    }

    public final void onStateChanged(0CH r1, 0CB r2) {
        AppsFlyerAttributionMethod.super.onStateChanged(r1, r2);
    }

    public /* synthetic */ AppsFlyerAttributionMethod() {
        this((KKi) null);
    }

    public AppsFlyerAttributionMethod(KKi kKi) {
        super(kKi);
    }

    public final void handle(JSONObject jSONObject, FIu fIu) {
        JSONObject optJSONObject;
        Iterator<String> keys;
        String str = null;
        if (jSONObject != null) {
            str = jSONObject.optString("event_name", "");
        }
        LinkedHashMap linkedHashMap = new LinkedHashMap();
        if (!(jSONObject == null || !jSONObject.has("params") || (optJSONObject = jSONObject.optJSONObject("params")) == null || (keys = optJSONObject.keys()) == null)) {
            while (keys.hasNext()) {
                String next = keys.next();
                Object opt = optJSONObject.opt(next);
                n.LIZIZ(next, "");
                n.LIZIZ(opt, "");
                linkedHashMap.put(next, opt);
            }
        }
        UgCommonServiceImpl.LJIIL().LIZ().LIZ(str, (Map<String, ? extends Object>) linkedHashMap);
        if (fIu != null) {
            fIu.LIZ("");
        }
    }
}
