花瓣 v4.6.12版本的 MD5 值为:6a3515d4d16d98931f1b3d25a91b257e

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


package com.gaoding.analytics.android.sdk.analyticsa;

import android.app.Activity;
import android.app.Application;
import android.text.TextUtils;
import androidx.annotation.Keep;
import com.gaoding.analytics.android.sdk.a0;
import com.gaoding.analytics.android.sdk.f0;
import com.gaoding.analytics.android.sdk.s;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONException;
import org.json.JSONObject;
@Keep
public class GaodingDataLoader {
    public static final String WIND_DTA_CHECK_URL = "https://schema-manager.hlgdata.com";
    public static final String WIND_DTA_URL = "https://wind.hlgdata.com/";
    public static final String WIND_LOG_URL = "https://log-v2.hlgdata.com/";
    private List<s> mDataProcess;
    private String mDeviceId;
    private boolean mFlushEnable;
    private String mSourceLogId;

    class a implements f0 {
        a() {
        }

        @Override
        public JSONObject a() {
            try {
                com.gaoding.app.platform.shadow.d d2 = com.gaoding.foundations.framework.http.j.b.d();
                if (d2 == null) {
                    return null;
                }
                JSONObject jSONObject = new JSONObject();
                jSONObject.put("region_id", d2.n());
                jSONObject.put("biz_code", d2.j());
                jSONObject.put("endpoint", d2.m());
                jSONObject.put("channel_id", d2.l());
                return jSONObject;
            } catch (JSONException unused) {
                return null;
            }
        }
    }

    class b implements f0 {
        final JSONObject a;

        b(JSONObject jSONObject) {
            this.a = jSONObject;
        }

        @Override
        public JSONObject a() {
            return this.a;
        }
    }

    public static class c {
        static final GaodingDataLoader a = new GaodingDataLoader(null);

        c() {
        }
    }

    GaodingDataLoader(a aVar) {
        this();
    }

    public static GaodingDataLoader getLoader() {
        return c.a;
    }

    private void initGdAnalytics(Application application) {
        com.gaoding.foundations.framework.c.c b2 = com.gaoding.foundations.framework.c.c.b();
        a0 t2 = a0.t2(application, WIND_DTA_URL, WIND_LOG_URL, b2.h() ? a0.h0.DEBUG_AND_TRACK : a0.h0.DEBUG_OFF);
        t2.m0(30000);
        t2.R(com.gaoding.shadowinterface.f.a.e().getGDConfig().v());
        ArrayList arrayList = new ArrayList();
        arrayList.add(a0.g0.APP_START);
        arrayList.add(a0.g0.APP_END);
        arrayList.add(a0.g0.APP_VIEW_SCREEN);
        t2.h0(arrayList);
        t2.enableLog(b2.h());
    }

    public void addDataProcess(s sVar) {
        if (this.mDataProcess.contains(sVar)) {
            return;
        }
        this.mDataProcess.add(sVar);
    }

    public void addDynamicSuperProperties(JSONObject jSONObject) {
        if (jSONObject == null) {
            return;
        }
        a0.p2().D(new b(jSONObject));
    }

    public void init(Application application) {
        initGdAnalytics(application);
    }

    public boolean isFlushEnable() {
        return this.mFlushEnable;
    }

    public JSONObject processData(int i2, JSONObject jSONObject) {
        if (!this.mDataProcess.isEmpty()) {
            for (s sVar : this.mDataProcess) {
                sVar.a(i2, jSONObject);
            }
        }
        return jSONObject;
    }

    public void registerCoordinate() {
        a0.p2().D(new a());
    }

    public void setChannel(String str) {
        a0.p2().j2(str);
    }

    public void setFlushEnable(boolean z) {
        this.mFlushEnable = z;
    }

    public void setLogProject(String str) {
        a0.p2().l2(str);
    }

    public void setProject(String str) {
        a0.p2().m2(str);
    }

    public void setRealtimeCode(String str) {
        a0.p2().n2(str);
    }

    public void track(String str, JSONObject jSONObject) {
        a0.p2().f1(str, jSONObject);
    }

    public synchronized void trackLog(GdLogData gdLogData) {
        JSONObject jSONObject = new JSONObject();
        if (gdLogData != null) {
            try {
                jSONObject.put("message", gdLogData.getMessage());
                jSONObject.put("module", gdLogData.getModule());
                jSONObject.put(com.gaoding.analytics.android.sdk.c.P, gdLogData.getMethod());
                jSONObject.put("filename", gdLogData.getFilename());
                jSONObject.put(com.gaoding.analytics.android.sdk.c.O, gdLogData.getAttributes());
                jSONObject.put(com.gaoding.analytics.android.sdk.c.R, gdLogData.getLevel());
                jSONObject.put("log_type", gdLogData.getLogType());
                jSONObject.put(com.gaoding.analytics.android.sdk.c.J, gdLogData.getLogId());
                jSONObject.put("timestamp", gdLogData.getTimestamp());
                if (!TextUtils.isEmpty(this.mSourceLogId)) {
                    jSONObject.put(com.gaoding.analytics.android.sdk.c.L, this.mSourceLogId);
                }
                this.mSourceLogId = gdLogData.getLogId();
            } catch (JSONException e2) {
                e2.printStackTrace();
            }
        }
        a0.p2().O0(jSONObject);
    }

    public void trackStart() {
        a0.p2().P();
    }

    public void trackViewScreen(Object obj) {
        a0.p2().b(obj);
    }

    private GaodingDataLoader() {
        this.mDataProcess = new ArrayList();
    }

    public void trackViewScreen(Activity activity) {
        a0.p2().a(activity);
    }
}