高佣联盟 v6.22.57版本的 MD5 值为:0c736d87a62b04809b5a48aa82055f6a

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


package com.netease.yunxin.report.sdk;

import K93XIfXxAzDpKiU1N9o4.OrVRMxrTMoQLF2JIMQVo.sl5ZJT6Tn7Of7Nx9kl5t.C0933;
import android.content.Context;
import org.json.JSONObject;
public class ReportComponent {
    private static final String REPORTER_SERVER = "https://statistic.live.126.net/statics/report/common/form";
    private String appKey;
    private IAssembler assembler;
    private Context context;
    private String deviceID;
    private int eventThresholdCount;
    private LogCallback logCallback;
    private String sdkType;
    private String sdkVersion;
    private String server;

    public static class Builder {
        private static final int EVENT_THRESHOLD_COUNT = 50;
        private String appKey;
        private IAssembler assembler;
        private Context context;
        private String deviceID;
        private LogCallback logCallback;
        private String sdkType;
        private String sdkVersion;
        private String server = ReportComponent.REPORTER_SERVER;
        private boolean dev = false;
        private int eventThresholdCount = 50;

        public Builder(Context context, String str, String str2, String str3, String str4) {
            this.context = context.getApplicationContext();
            this.appKey = str;
            this.sdkType = str2;
            this.sdkVersion = str3;
            this.deviceID = str4;
        }

        public Builder assembler(IAssembler iAssembler) {
            this.assembler = iAssembler;
            return this;
        }

        public ReportComponent build() {
            ReportComponent reportComponent = new ReportComponent(this.context, this.appKey, this.sdkType, this.sdkVersion, this.deviceID);
            if (this.dev) {
                this.server = this.server.replaceFirst(C0933.f2393, C0933.f2395);
            }
            reportComponent.server(this.server).logCallback(this.logCallback).assembler(this.assembler).eventThresholdCount(this.eventThresholdCount);
            return reportComponent;
        }

        public Builder dev(boolean z) {
            this.dev = z;
            return this;
        }

        public Builder eventThresholdCount(int i) {
            if (i < 0) {
                return this;
            }
            this.eventThresholdCount = i;
            return this;
        }

        public Builder logCallback(LogCallback logCallback) {
            this.logCallback = logCallback;
            return this;
        }

        public Builder server(String str) {
            this.server = str;
            return this;
        }
    }

    public interface IAssembler {
        JSONObject createCommonJson();
    }

    public interface LogCallback {
        void log(int i, String str, String str2);
    }

    public ReportComponent logCallback(LogCallback logCallback) {
        this.logCallback = logCallback;
        return this;
    }

    public ReportComponent server(String str) {
        this.server = str;
        return this;
    }

    public ReportComponent assembler(IAssembler iAssembler) {
        this.assembler = iAssembler;
        return this;
    }

    public ReportComponent eventThresholdCount(int i) {
        this.eventThresholdCount = i;
        return this;
    }

    public String getAppKey() {
        return this.appKey;
    }

    public IAssembler getAssembler() {
        return this.assembler;
    }

    public Context getContext() {
        return this.context;
    }

    public String getDeviceID() {
        return this.deviceID;
    }

    public int getEventThresholdCount() {
        return this.eventThresholdCount;
    }

    public LogCallback getLogCallback() {
        return this.logCallback;
    }

    public String getSdkType() {
        return this.sdkType;
    }

    public String getSdkVersion() {
        return this.sdkVersion;
    }

    public String getServer() {
        return this.server;
    }

    private ReportComponent(Context context, String str, String str2, String str3, String str4) {
        this.context = context;
        this.appKey = str;
        this.sdkType = str2;
        this.sdkVersion = str3;
        this.deviceID = str4;
    }
}