导航菜单

页面标题

页面副标题

Spermatid Pro v6.4.3 - m.java 源代码

正在查看: Spermatid Pro v6.4.3 应用的 m.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.octopus.ad.internal;

import android.annotation.SuppressLint;
import android.app.Application;
import android.content.Context;
import android.os.Build;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.Log;
import android.webkit.WebSettings;
import com.octopus.ad.Octopus;
import com.octopus.ad.internal.a.h;
import com.octopus.ad.internal.utilities.HaoboLog;
import com.octopus.ad.internal.utilities.SPUtils;
import com.octopus.ad.model.c;
import com.octopus.ad.utils.OctUtil;
import com.octopus.ad.utils.ThreadUtils;
import com.octopus.ad.utils.b.b;
import com.octopus.ad.utils.b.g;
import com.octopus.ad.utils.b.j;
import com.octopus.ad.utils.d;
import com.octopus.ad.utils.e;
import com.octopus.ad.utils.f;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;

public class m {
    private static boolean P = false;
    public static String k = null;

    public static String f2308l = "";
    public static String m = "";

    public static int f2309q = 1000;

    public static int f2310r = 1000;

    public static long f2311s = 7200000;
    private static m t;

    private static boolean f2312w;
    private float G;
    private DisplayMetrics I;
    private h N;
    private long O;
    public int a;
    public String e;
    public String f;

    public String f2316i;

    public Context f2317n;
    public float o;
    public float p;
    private String u;

    private String f2318v;
    private a y;

    private Boolean f2320z;

    private int f2319x = 0;

    public boolean f2313b = true;

    public boolean f2314c = false;

    public boolean f2315d = false;
    public ConcurrentHashMap<String, com.octopus.ad.model.a> g = new ConcurrentHashMap<>();
    public boolean h = false;
    public HashMap<String, String> j = new HashMap<>();
    private HashSet<String> A = new HashSet<>();
    private HashSet<String> B = new HashSet<>();
    private HashSet<String> C = new HashSet<>();
    private HashSet<String> D = new HashSet<>();
    private HashSet<String> E = new HashSet<>();
    private HashSet<String> F = new HashSet<>();
    private boolean H = true;
    private boolean J = false;
    private boolean K = false;
    private boolean L = false;
    private boolean M = false;

    public static int a(m mVar) {
        int i3 = mVar.f2319x;
        mVar.f2319x = i3 + 1;
        return i3;
    }

    public static int b(m mVar) {
        int i3 = mVar.f2319x;
        mVar.f2319x = i3 - 1;
        return i3;
    }

    private h u() {
        Context context = this.f2317n;
        if (context == null) {
            return null;
        }
        try {
            return new h.a(context).a(536870912L).a();
        } catch (Exception unused) {
            return null;
        }
    }

    @SuppressLint({"SoonBlockedPrivateApi"})
    private void v() {
        try {
            Class.forName("android.content.pm.PackageParser$Package").getDeclaredConstructor(String.class).setAccessible(true);
        } catch (Throwable unused) {
        }
        try {
            Class<?> cls = Class.forName("android.app.ActivityThread");
            Method declaredMethod = cls.getDeclaredMethod("currentActivityThread", new Class[0]);
            declaredMethod.setAccessible(true);
            Object invoke = declaredMethod.invoke(null, new Object[0]);
            Field declaredField = cls.getDeclaredField("mHiddenApiWarningShown");
            declaredField.setAccessible(true);
            declaredField.setBoolean(invoke, true);
        } catch (Throwable unused2) {
        }
    }

    public void a(String str, boolean z4) {
    }

    public boolean e() {
        return this.M;
    }

    public float f() {
        return this.G;
    }

    public boolean g() {
        return this.H;
    }

    public String h() {
        return k;
    }

    public String i() {
        return this.u;
    }

    public String j() {
        return this.f2318v;
    }

    public Context k() {
        return this.f2317n;
    }

    public synchronized String l() {
        if (TextUtils.isEmpty(this.f2316i)) {
            try {
                if (Build.VERSION.SDK_INT >= 17) {
                    this.f2316i = WebSettings.getDefaultUserAgent(this.f2317n);
                }
            } catch (Exception e) {
                g.a("OctopusAd", "An Exception Caught", e);
            }
            if (TextUtils.isEmpty(this.f2316i)) {
                this.f2316i = "Mozilla/5.0 (Linux; Android " + Build.VERSION.RELEASE + "; " + Build.MODEL + " Build/UP1A.231005.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile Safari/537.36";
            }
        }
        return this.f2316i;
    }

    public String m() {
        if (!TextUtils.isEmpty(this.e)) {
            return this.e;
        }
        String replace = this.f2314c ? "http://sdk.zhangyuyidong.cn".replace("http:", "https:") : "http://sdk.zhangyuyidong.cn";
        return this.f2315d ? replace.replace("sdk.", "sdk6.") : replace;
    }

    public String n() {
        if (!TextUtils.isEmpty(this.f)) {
            return this.f;
        }
        String replace = this.f2314c ? "http://sdklog.zhangyuyidong.cn".replace("http:", "https:") : "http://sdklog.zhangyuyidong.cn";
        return this.f2315d ? replace.replace("sdklog.", "sdklog6.") : replace;
    }

    public float o() {
        return this.o;
    }

    public float p() {
        return this.p;
    }

    public float q() {
        return Math.max(this.o, this.p);
    }

    public DisplayMetrics r() {
        return this.I;
    }

    public HashSet<String> s() {
        return this.F;
    }

    public boolean t() {
        return P;
    }

    public void c() {
        if (this.K) {
            return;
        }
        this.K = true;
        try {
            OctUtil.a().init(this.f2317n);
        } catch (Exception e) {
            g.a("OctopusAd", "A Throwable Caught", e);
        }
    }

    public void d() {
        if (this.L || !this.M) {
            return;
        }
        this.L = true;
        ThreadUtils.runOnUIThread(new 4(this));
    }

    public h b() {
        if (this.f2317n == null) {
            return null;
        }
        h hVar = this.N;
        if (hVar != null) {
            return hVar;
        }
        h u = u();
        this.N = u;
        return u;
    }

    public void b(com.octopus.ad.model.a aVar) {
        new Thread((Runnable) new 6(this, aVar)).start();
    }

    public void d(String str) {
        try {
            if (TextUtils.isEmpty(str)) {
                return;
            }
            if (str.contains("track=oct")) {
                str = str + "&opt=13&result=0&wait=" + (j.c() - this.O);
            }
            new h(str).execute();
        } catch (Exception e) {
            g.a("OctopusAd", "An Exception Caught", e);
        }
    }

    public void c(String str) {
        if (TextUtils.isEmpty(str)) {
            return;
        }
        this.f2316i = str;
    }

    public static m a() {
        m mVar;
        synchronized (m.class) {
            if (t == null) {
                t = new m();
            }
            mVar = t;
        }
        return mVar;
    }

    public void b(String str) {
        this.f2318v = str;
    }

    public String b(boolean z4) {
        Boolean bool = this.f2320z;
        return m() + ((bool == null || bool.booleanValue()) ? z4 ? "/api/zysdksd?isEncrypt=2" : "/api/zysdk?isEncrypt=2" : z4 ? "/api/zysdksd?isEncrypt=0" : "/api/zysdk?isEncrypt=0");
    }

    public void c(boolean z4) {
        P = z4;
    }

    public void a(a aVar) {
        this.y = aVar;
    }

    public void a(Context context, String str) {
        synchronized (m.class) {
            try {
                if (context != null) {
                    Log.i("OctopusAd", "SDK_VERSION:1.6.3.6");
                    this.f2317n = context.getApplicationContext();
                    try {
                        ThreadUtils.runOnThreadPool(new 1(this));
                        this.M = j.b("com.octopus.ad.utils.OctUtil$C");
                        this.f2313b = SPUtils.getBoolean(this.f2317n, "getBootId");
                        this.f2315d = SPUtils.getBoolean(this.f2317n, "ipv6");
                        this.f2314c = SPUtils.getBoolean(this.f2317n, "ssl");
                        this.e = SPUtils.getString(this.f2317n, "sdk");
                        this.f = SPUtils.getString(this.f2317n, "sdklog");
                        this.f2320z = (Boolean) SPUtils.getFromGroupSdk(this.f2317n, "encrypt", Boolean.TRUE);
                        ha.a.a().c(this.f2317n);
                        ha.a.a().h();
                        ThreadUtils.runOnThreadPool(new b(this.f2317n));
                        Long l2 = (Long) SPUtils.get(this.f2317n, "duration", 86400L);
                        String str2 = (String) SPUtils.get(this.f2317n, "version", "1686041703212");
                        Long l3 = (Long) SPUtils.get(this.f2317n, "lastReqTime", 0L);
                        if (l2 != null && str2 != null && l3 != null && j.c() - l3.longValue() > l2.longValue()) {
                            new j(m() + "/sdk/config?version=" + str2 + "&appId=" + str + "&os=android").execute();
                        }
                        ((Application) this.f2317n).registerActivityLifecycleCallbacks(new 2(this));
                    } catch (Exception e) {
                        g.a("OctopusAd", "An Exception Caught", e);
                    }
                    if (!Octopus.isLimitPersonalAds()) {
                        com.octopus.ad.utils.a.b.a((Application) this.f2317n);
                    }
                    HaoboLog.setErrorContext(this.f2317n);
                    k = str;
                    DisplayMetrics displayMetrics = this.f2317n.getResources().getDisplayMetrics();
                    this.I = displayMetrics;
                    int i3 = displayMetrics.widthPixels;
                    int i5 = displayMetrics.heightPixels;
                    if (i3 < i5) {
                        this.o = i3 / 720.0f;
                        this.p = i5 / 1280.0f;
                    } else {
                        this.o = i5 / 720.0f;
                        this.p = i3 / 1280.0f;
                    }
                    if (!this.J) {
                        f.a(this.f2317n).a(new e() {
                            public void a(long j, long j2) {
                                g.a("OctopusAd", "在线时长:" + (j2 - j));
                                SPUtils.put(m.this.f2317n, "startTime", Long.valueOf(j));
                                SPUtils.put(m.this.f2317n, "endTime", Long.valueOf(j2));
                            }

                            public void a() {
                                g.a("OctopusAd", "上报活跃量");
                            }
                        });
                    }
                    this.J = true;
                    if (Build.VERSION.SDK_INT >= 28) {
                        v();
                    }
                } else {
                    throw new IllegalArgumentException("Context cannot be null.");
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    public void a(com.octopus.ad.model.a aVar) {
        final List i3;
        if (aVar == null || (i3 = aVar.i()) == null) {
            return;
        }
        for (int i5 = 0; i5 < i3.size(); i5++) {
            c.i iVar = (c.i) i3.get(i5);
            if (iVar != null && !TextUtils.isEmpty(iVar.a())) {
                String a = iVar.a();
                if (a.contains("track=oct")) {
                    a = a + "&opt=13";
                }
                new h(a).execute();
            }
        }
        d.a(new Runnable() {
            @Override
            public void run() {
                for (int i6 = 0; i6 < i3.size(); i6++) {
                    try {
                        c.i iVar2 = (c.i) i3.get(i6);
                        if (iVar2 != null && !TextUtils.isEmpty(iVar2.b())) {
                            String b2 = iVar2.b();
                            if (b2.contains("track=oct")) {
                                b2 = b2 + "&opt=13";
                            }
                            new h(b2).execute();
                        }
                        if (iVar2 != null && !TextUtils.isEmpty(iVar2.c())) {
                            String c2 = iVar2.c();
                            m.this.O = j.c();
                            m.a().a((a) new 1(this, c2));
                        }
                    } catch (Throwable th) {
                        g.a("OctopusAd", "A Throwable Caught", th);
                        return;
                    }
                }
            }
        }, aVar.h());
    }

    public void a(float f) {
        s.a(0.0f <= f && f <= 1.0f, "The app volume must be a value between 0 and 1 inclusive.");
        s.a(k, "Octopus.initialize() must be called prior to setting the app volume.");
        this.G = f;
    }

    public void a(boolean z4) {
        s.a(k, "Octopus.initialize() must be called prior to setting the app volume.");
        this.H = z4;
    }

    public void a(String str) {
        this.u = str;
    }

    public void a(int i3) {
        f2309q = i3;
        f2310r = i3;
    }
}