龙城战记 v1.0.1版本的 MD5 值为:00000931b93a3ccf40631848e86a593d

以下内容为反编译后的 c.java 源代码,内容仅作参考


package com.kwai.monitor.a;

import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import com.kwai.monitor.c.d;
import com.kwai.monitor.e.f;
import org.json.JSONObject;

public class c {
    private Handler e;

    private c() {
        this.e = new Handler(Looper.getMainLooper());
    }

    public static void z() {
        A().B();
    }

    public enum a {
        INSTANCE;

        private c i = new c();

        a() {
        }

        c A() {
            return this.i;
        }
    }

    public static c A() {
        return a.INSTANCE.A();
    }

    private void B() {
        if (!b.x()) {
            this.e.postDelayed(new Runnable() {
                @Override
                public void run() {
                    com.kwai.monitor.c.a.F().a("https://api.e.kuaishou.com/rest/config/client/v1/open/globalId", new d() {
                        @Override
                        public void a(com.kwai.monitor.b.b bVar) {
                            if (bVar != null && bVar.o != null && bVar.o.q) {
                                com.kwai.monitor.e.b.c("TurboLog", "register sdk success");
                                b.w();
                                c.this.C();
                                c.this.onAppActive();
                                if (!TextUtils.isEmpty(bVar.o.p)) {
                                    b.b(bVar.o.p);
                                    return;
                                }
                                return;
                            }
                            com.kwai.monitor.e.b.c("TurboLog", "register sdk fail :" + (bVar != null ? bVar.n : null));
                        }
                    });
                }
            }, 1000L);
        } else if (b.y()) {
            com.kwai.monitor.c.a.F().a("https://api.e.kuaishou.com/rest/config/client/v1/open/globalId", new d() {
                @Override
                public void a(com.kwai.monitor.b.b bVar) {
                    com.kwai.monitor.e.b.b("TurboLog", "request global success");
                    if (bVar != null && bVar.o != null && !TextUtils.isEmpty(bVar.o.p)) {
                        b.b(bVar.o.p);
                    }
                }
            });
        }
    }

    public void onEvent(String str) {
        if (!b.x()) {
            com.kwai.monitor.e.b.c("TurboLog", "onEvent sdk is not init, please init first");
        } else {
            com.kwai.monitor.c.a.F().a("https://ad.partner.gifshow.com/api/v2/sdk/log?token=dee6172daef74f0895c7d185956ac0a7", str, -1.0d, -1L, null, -1, null);
        }
    }

    public void onEvent(String str, JSONObject jSONObject) {
        if (!b.x()) {
            com.kwai.monitor.e.b.c("TurboLog", "onEvent sdk is not init, please init first");
        } else {
            com.kwai.monitor.c.a.F().a("https://ad.partner.gifshow.com/api/v2/sdk/log?token=dee6172daef74f0895c7d185956ac0a7", str, -1.0d, -1L, null, -1, jSONObject);
        }
    }

    private void a(String str, long j, JSONObject jSONObject) {
        if (!b.x()) {
            com.kwai.monitor.e.b.c("TurboLog", "onEvent sdk is not init, please init first");
        } else {
            com.kwai.monitor.c.a.F().a("https://ad.partner.gifshow.com/api/v2/sdk/log?token=dee6172daef74f0895c7d185956ac0a7", str, -1.0d, j, null, -1, jSONObject);
        }
    }

    private void a(String str, double d, JSONObject jSONObject) {
        if (!b.x()) {
            com.kwai.monitor.e.b.c("TurboLog", "onEvent sdk is not init, please init first");
        } else {
            com.kwai.monitor.c.a.F().a("https://ad.partner.gifshow.com/api/v2/sdk/log?token=dee6172daef74f0895c7d185956ac0a7", str, d, -1L, null, -1, jSONObject);
        }
    }

    private void a(String str, String str2, JSONObject jSONObject) {
        if (!b.x()) {
            com.kwai.monitor.e.b.c("TurboLog", "onEvent sdk is not init, please init first");
        } else {
            com.kwai.monitor.c.a.F().a("https://ad.partner.gifshow.com/api/v2/sdk/log?token=dee6172daef74f0895c7d185956ac0a7", str, -1.0d, -1L, str2, -1, jSONObject);
        }
    }

    private void a(String str, int i, JSONObject jSONObject) {
        if (!b.x()) {
            com.kwai.monitor.e.b.c("TurboLog", "onEvent sdk is not init, please init first");
        } else {
            com.kwai.monitor.c.a.F().a("https://ad.partner.gifshow.com/api/v2/sdk/log?token=dee6172daef74f0895c7d185956ac0a7", str, -1.0d, -1L, null, i, jSONObject);
        }
    }

    public void C() {
        if (!TextUtils.isEmpty(com.kwai.monitor.d.a.getOAID())) {
            onEvent("EVENT_CONVERSION");
        } else if (!TextUtils.isEmpty(f.d(b.getContext()))) {
            onEvent("EVENT_CONVERSION");
        } else {
            com.kwai.monitor.e.b.c("TurboLog", "onAppConversion oaid and imei is null");
            this.e.postDelayed(new Runnable() {
                @Override
                public void run() {
                    c.this.onEvent("EVENT_CONVERSION");
                }
            }, 5000L);
        }
    }

    public void onAppActive() {
        if (!TextUtils.isEmpty(com.kwai.monitor.d.a.getOAID())) {
            onEvent("EVENT_ACTIVE");
        } else if (!TextUtils.isEmpty(f.d(b.getContext()))) {
            onEvent("EVENT_ACTIVE");
        } else {
            this.e.postDelayed(new Runnable() {
                @Override
                public void run() {
                    c.this.onEvent("EVENT_ACTIVE");
                }
            }, 500L);
        }
    }

    public void D() {
        onEvent("EVENT_NEXTDAY_STAY");
    }

    public void E() {
        onEvent("EVENT_WEEK_STAY");
    }

    public void onRegister() {
        onEvent("EVENT_REGISTER");
    }

    public void onFormSubmit() {
        onEvent("EVENT_FORM_SUBMIT");
    }

    public void onAffairFinish() {
        onEvent("EVENT_JINJIAN");
    }

    public void onCreditGrant() {
        onEvent("EVENT_CREDIT_GRANT");
    }

    public void onPay(double d) {
        a("EVENT_PAY", d, (JSONObject) null);
    }

    public void onGoodsView(double d) {
        a("EVENT_GOODS_VIEW", d, (JSONObject) null);
    }

    public void onAddShoppingCart(double d) {
        a("EVENT_ADD_SHOPPINGCART", d, (JSONObject) null);
    }

    public void onOrderSubmit(double d) {
        a("EVENT_ORDER_SUBMIT", d, (JSONObject) null);
    }

    public void onOrderPayed(double d) {
        a("EVENT_ORDER_PAIED", d, (JSONObject) null);
    }

    public void a(long j) {
        a("EVENT_GAME_REPORT_DURATION", j, (JSONObject) null);
    }

    public void onGameCreateRole(String str) {
        a("EVENT_GAME_CREATE_ROLE", str, (JSONObject) null);
    }

    public void onGameUpgradeRole(int i) {
        a("EVENT_GAME_UPGRADE_ROLE", i, (JSONObject) null);
    }

    public void onGameWatchRewardVideo() {
        onEvent("EVENT_GAME_WATCH_REWARD_VIDEO", null);
    }

    public void onGameConsumption(double d) {
        a("EVENT_GAME_CONSUMPTION", d, (JSONObject) null);
    }

    public void onWatchAppAd() {
        onEvent("EVENT_WATCH_APP_AD");
    }
}