Kufar v3.2.0版本的 MD5 值为:6a4d203db1c561c7e3bcd50d23fed59f

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


package com.my.target;

import android.content.Context;
import android.util.Base64;
import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import com.ironsource.mediationsdk.impressionData.ImpressionData;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import com.my.target.d1;
import com.my.target.y4;
import com.tapjoy.TapjoyAuctionFlags;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONObject;

public final class y4 {

    @NonNull
    public final Map<String, Object> f51641a;

    @NonNull
    public final Map<Integer, Long> f51642b;

    public final long f51643c;

    public final int f51644d;

    public boolean f51645e;

    public static final class a {

        public final int f51646a;

        public boolean f51647b = false;

        public a(int i11) {
            this.f51646a = i11;
        }

        @NonNull
        public y4 a() {
            y4 y4Var = new y4(this.f51646a, "myTarget", 0);
            y4Var.a(this.f51647b);
            return y4Var;
        }

        @NonNull
        public y4 b() {
            y4 y4Var = new y4(this.f51646a, "myTarget", 4);
            y4Var.a(this.f51647b);
            return y4Var;
        }

        @NonNull
        public y4 a(@NonNull String str, float f11) {
            y4 y4Var = new y4(this.f51646a, str, 5);
            y4Var.a(this.f51647b);
            y4Var.f51641a.put("priority", Float.valueOf(f11));
            return y4Var;
        }

        public void a(boolean z11) {
            this.f51647b = z11;
        }
    }

    public y4(int i11, @NonNull String str, int i12) {
        HashMap hashMap = new HashMap();
        this.f51641a = hashMap;
        this.f51642b = new HashMap();
        this.f51644d = i12;
        this.f51643c = System.currentTimeMillis();
        hashMap.put("slot", Integer.valueOf(i11));
        hashMap.put("network", str);
    }

    public void b() {
        b(this.f51644d, System.currentTimeMillis() - this.f51643c);
    }

    @NonNull
    public static a a(int i11) {
        return new a(i11);
    }

    public void b(int i11, long j11) {
        this.f51642b.put(Integer.valueOf(i11), Long.valueOf(j11));
    }

    @NonNull
    @VisibleForTesting
    public String a() {
        JSONObject jSONObject = new JSONObject();
        try {
            for (Map.Entry<String, Object> entry : this.f51641a.entrySet()) {
                jSONObject.put(entry.getKey(), entry.getValue());
            }
            JSONArray jSONArray = new JSONArray();
            jSONObject.put("events", jSONArray);
            for (Map.Entry<Integer, Long> entry2 : this.f51642b.entrySet()) {
                JSONObject jSONObject2 = new JSONObject();
                jSONObject2.put(TapjoyAuctionFlags.AUCTION_TYPE, entry2.getKey());
                jSONObject2.put(AppMeasurementSdk.ConditionalUserProperty.VALUE, entry2.getValue());
                jSONArray.put(jSONObject2);
            }
        } catch (Throwable unused) {
        }
        return jSONObject.toString();
    }

    public void b(@NonNull final Context context) {
        if (!this.f51645e) {
            c9.a("MetricMessage: Metrics sending disabled");
            return;
        }
        if (this.f51642b.isEmpty()) {
            c9.a("MetricMessage: Metrics not send: empty");
            return;
        }
        d1.a a11 = j1.c().a();
        if (a11 == null) {
            c9.a("MetricMessage: Metrics not send: basic info not collected");
            return;
        }
        this.f51641a.put(ImpressionData.IMPRESSION_DATA_KEY_INSTANCE_ID, a11.f50423a);
        this.f51641a.put("os", a11.f50424b);
        this.f51641a.put("osver", a11.f50425c);
        this.f51641a.put("app", a11.f50426d);
        this.f51641a.put("appver", a11.f50427e);
        this.f51641a.put("sdkver", a11.f50428f);
        z.b(new Runnable() {
            @Override
            public final void run() {
                y4.this.a(context);
            }
        });
    }

    public void a(int i11, long j11) {
        Long l11 = this.f51642b.get(Integer.valueOf(i11));
        if (l11 != null) {
            j11 += l11.longValue();
        }
        b(i11, j11);
    }

    public void a(Context context) {
        String a11 = a();
        c9.a("MetricMessage: Send metrics message - \n " + a11);
        s1.d().a("https://ad.mail.ru/sdk/ms/", Base64.encodeToString(a11.getBytes(Charset.forName(C.UTF8_NAME)), 0), context);
    }

    public void a(boolean z11) {
        this.f51645e = z11;
    }
}