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

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


package com.adcolony.sdk;

import android.util.Log;
import com.applovin.sdk.AppLovinEventTypes;
import com.bytedance.sdk.openadsdk.api.init.PAGSdk;
import com.tapjoy.TJAdUnitConstants;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.TimeUnit;

public class g0 {

    static boolean f23726f = false;

    static int f23727g = 3;

    static int f23728h = 1;

    private f1 f23729a = c0.b();

    private e1 f23730b = null;

    private ExecutorService f23731c = null;

    private final Queue<Runnable> f23732d = new ConcurrentLinkedQueue();

    s0 f23733e;

    public class a implements j0 {
        public a() {
        }

        @Override
        public void a(h0 h0Var) {
            g0.this.b(c0.d(h0Var.a(), "module"), 0, c0.h(h0Var.a(), TJAdUnitConstants.String.MESSAGE), true);
        }
    }

    public class b implements Runnable {

        final int f23735a;

        final String f23736b;

        final int f23737c;

        final boolean f23738d;

        public b(int i11, String str, int i12, boolean z11) {
            this.f23735a = i11;
            this.f23736b = str;
            this.f23737c = i12;
            this.f23738d = z11;
        }

        @Override
        public void run() {
            g0.this.a(this.f23735a, this.f23736b, this.f23737c);
            int i11 = 0;
            while (i11 <= this.f23736b.length() / PAGSdk.INIT_LOCAL_FAIL_CODE) {
                int i12 = i11 * PAGSdk.INIT_LOCAL_FAIL_CODE;
                i11++;
                int min = Math.min(i11 * PAGSdk.INIT_LOCAL_FAIL_CODE, this.f23736b.length());
                if (this.f23737c == 3) {
                    g0 g0Var = g0.this;
                    if (g0Var.a(c0.f(g0Var.f23729a, Integer.toString(this.f23735a)), 3, this.f23738d)) {
                        Log.d("AdColony [TRACE]", this.f23736b.substring(i12, min));
                    }
                }
                if (this.f23737c == 2) {
                    g0 g0Var2 = g0.this;
                    if (g0Var2.a(c0.f(g0Var2.f23729a, Integer.toString(this.f23735a)), 2, this.f23738d)) {
                        Log.i("AdColony [INFO]", this.f23736b.substring(i12, min));
                    }
                }
                if (this.f23737c == 1) {
                    g0 g0Var3 = g0.this;
                    if (g0Var3.a(c0.f(g0Var3.f23729a, Integer.toString(this.f23735a)), 1, this.f23738d)) {
                        Log.w("AdColony [WARNING]", this.f23736b.substring(i12, min));
                    }
                }
                if (this.f23737c == 0) {
                    g0 g0Var4 = g0.this;
                    if (g0Var4.a(c0.f(g0Var4.f23729a, Integer.toString(this.f23735a)), 0, this.f23738d)) {
                        Log.e("AdColony [ERROR]", this.f23736b.substring(i12, min));
                    }
                }
                if (this.f23737c == -1 && g0.f23727g >= -1) {
                    Log.e("AdColony [FATAL]", this.f23736b.substring(i12, min));
                }
            }
        }
    }

    public class c implements j0 {
        public c(g0 g0Var) {
        }

        @Override
        public void a(h0 h0Var) {
            g0.f23727g = c0.d(h0Var.a(), AppLovinEventTypes.USER_COMPLETED_LEVEL);
        }
    }

    public class d implements j0 {
        public d() {
        }

        @Override
        public void a(h0 h0Var) {
            g0.this.b(c0.d(h0Var.a(), "module"), 3, c0.h(h0Var.a(), TJAdUnitConstants.String.MESSAGE), false);
        }
    }

    public class e implements j0 {
        public e() {
        }

        @Override
        public void a(h0 h0Var) {
            g0.this.b(c0.d(h0Var.a(), "module"), 3, c0.h(h0Var.a(), TJAdUnitConstants.String.MESSAGE), true);
        }
    }

    public class f implements j0 {
        public f() {
        }

        @Override
        public void a(h0 h0Var) {
            g0.this.b(c0.d(h0Var.a(), "module"), 2, c0.h(h0Var.a(), TJAdUnitConstants.String.MESSAGE), false);
        }
    }

    public class g implements j0 {
        public g() {
        }

        @Override
        public void a(h0 h0Var) {
            g0.this.b(c0.d(h0Var.a(), "module"), 2, c0.h(h0Var.a(), TJAdUnitConstants.String.MESSAGE), true);
        }
    }

    public class h implements j0 {
        public h() {
        }

        @Override
        public void a(h0 h0Var) {
            g0.this.b(c0.d(h0Var.a(), "module"), 1, c0.h(h0Var.a(), TJAdUnitConstants.String.MESSAGE), false);
        }
    }

    public class i implements j0 {
        public i() {
        }

        @Override
        public void a(h0 h0Var) {
            g0.this.b(c0.d(h0Var.a(), "module"), 1, c0.h(h0Var.a(), TJAdUnitConstants.String.MESSAGE), true);
        }
    }

    public class j implements j0 {
        public j() {
        }

        @Override
        public void a(h0 h0Var) {
            g0.this.b(c0.d(h0Var.a(), "module"), 0, c0.h(h0Var.a(), TJAdUnitConstants.String.MESSAGE), false);
        }
    }

    public void b(int i11, int i12, String str, boolean z11) {
        if (a(a(i11, i12, str, z11))) {
            return;
        }
        synchronized (this.f23732d) {
            this.f23732d.add(a(i11, i12, str, z11));
        }
    }

    public void c() {
        com.adcolony.sdk.a.a("Log.set_log_level", new c(this));
        com.adcolony.sdk.a.a("Log.public.trace", new d());
        com.adcolony.sdk.a.a("Log.private.trace", new e());
        com.adcolony.sdk.a.a("Log.public.info", new f());
        com.adcolony.sdk.a.a("Log.private.info", new g());
        com.adcolony.sdk.a.a("Log.public.warning", new h());
        com.adcolony.sdk.a.a("Log.private.warning", new i());
        com.adcolony.sdk.a.a("Log.public.error", new j());
        com.adcolony.sdk.a.a("Log.private.error", new a());
    }

    public void d() {
        ExecutorService executorService = this.f23731c;
        if (executorService == null || executorService.isShutdown() || this.f23731c.isTerminated()) {
            this.f23731c = Executors.newSingleThreadExecutor();
        }
        synchronized (this.f23732d) {
            while (!this.f23732d.isEmpty()) {
                a(this.f23732d.poll());
            }
        }
    }

    public void a(int i11, String str, boolean z11) {
        b(0, i11, str, z11);
    }

    private Runnable a(int i11, int i12, String str, boolean z11) {
        return new b(i11, str, i12, z11);
    }

    public boolean a(f1 f1Var, int i11, boolean z11) {
        int d11 = c0.d(f1Var, "print_level");
        boolean b11 = c0.b(f1Var, "log_private");
        if (f1Var.b()) {
            d11 = f23727g;
            b11 = f23726f;
        }
        return (!z11 || b11) && d11 != 4 && d11 >= i11;
    }

    public void b(e1 e1Var) {
        this.f23729a = a(e1Var);
    }

    public e1 b() {
        return this.f23730b;
    }

    public boolean a(f1 f1Var, int i11) {
        int d11 = c0.d(f1Var, "send_level");
        if (f1Var.b()) {
            d11 = f23728h;
        }
        return d11 >= i11 && d11 != 4;
    }

    public void c(e1 e1Var) {
        if (e1Var != null) {
            e1Var.b(AppLovinEventTypes.USER_COMPLETED_LEVEL);
            e1Var.b(TJAdUnitConstants.String.MESSAGE);
        }
        this.f23730b = e1Var;
    }

    public void a(HashMap<String, Object> hashMap) {
        try {
            s0 s0Var = new s0(new d0(new URL("https://wd.adcolony.com/logs")), Executors.newSingleThreadScheduledExecutor(), hashMap);
            this.f23733e = s0Var;
            s0Var.a(5L, TimeUnit.SECONDS);
        } catch (MalformedURLException e11) {
            e11.printStackTrace();
        }
    }

    public void a(int i11, String str, int i12) {
        if (this.f23733e == null) {
            return;
        }
        if (i12 == 3 && a(c0.f(this.f23729a, Integer.toString(i11)), 3)) {
            this.f23733e.a(str);
            return;
        }
        if (i12 == 2 && a(c0.f(this.f23729a, Integer.toString(i11)), 2)) {
            this.f23733e.c(str);
            return;
        }
        if (i12 == 1 && a(c0.f(this.f23729a, Integer.toString(i11)), 1)) {
            this.f23733e.d(str);
        } else if (i12 == 0 && a(c0.f(this.f23729a, Integer.toString(i11)), 0)) {
            this.f23733e.b(str);
        }
    }

    public f1 a(e1 e1Var) {
        f1 b11 = c0.b();
        for (int i11 = 0; i11 < e1Var.b(); i11++) {
            f1 a11 = c0.a(e1Var, i11);
            c0.a(b11, Integer.toString(c0.d(a11, "id")), a11);
        }
        return b11;
    }

    private boolean a(Runnable runnable) {
        try {
            ExecutorService executorService = this.f23731c;
            if (executorService == null || executorService.isShutdown() || this.f23731c.isTerminated()) {
                return false;
            }
            this.f23731c.submit(runnable);
            return true;
        } catch (RejectedExecutionException unused) {
            Log.e("ADCLogError", "Internal error when submitting log to executor service.");
            return false;
        }
    }

    public s0 a() {
        return this.f23733e;
    }
}