导航菜单

页面标题

页面副标题

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

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

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


package dc;

import android.content.Context;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import cc.a;
import com.bykv.vk.component.ttvideo.VideoLiveManager$PlayCacheSyncRunner;
import com.hailiang.advlib.common.d;
import com.hailiang.advlib.common.e;
import com.hailiang.advlib.core.QMConfig;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicInteger;
import org.json.JSONObject;

public class f {
    public static final String a;
    public static final String b;

    public static String f2343c;

    public static String f2344d;
    public static String e;
    public static String f;
    public static volatile a g;
    public static AtomicInteger h;

    public static long f2345i;
    public static long j;
    public static Context k;
    public static List<d> l;
    public static String m;

    public static String f2346n;
    public static String o;

    public static int f2347p;

    public static boolean f2348q;

    public static b f2349r;
    public static boolean s;
    public static int t;

    public class c implements Runnable {
        public final Throwable a;
        public final boolean b;

        public final boolean f2350c;

        public c(Throwable th, boolean z, boolean z4) {
            this.a = th;
            this.b = z;
            this.f2350c = z4;
        }

        @Override
        public void run() {
            try {
                d.a(f.k, this.a.getMessage(), f.m(this.a), f.s(), this.b, this.f2350c);
            } catch (Throwable unused) {
            }
        }
    }

    static {
        String str = Build.VERSION.RELEASE;
        a = str.contains("12") ? "_hailiang_localjar" : "_hailiang_local.jar";
        b = str.contains("12") ? "_hailiang_remotejar" : "_hailiang_remote.jar";
        f2343c = "https://update0.qquanquan.com/qm/nsdk/cgi/";
        f2344d = null;
        e = null;
        f = null;
        g = null;
        h = new AtomicInteger(0);
        f2345i = 0L;
        j = 0L;
        l = new CopyOnWriteArrayList();
        t = 0;
    }

    public static void A() {
        for (d dVar : l) {
            dVar.a(x(), u());
            l.remove(dVar);
        }
    }

    public static void c(Context context, String str) {
        try {
            if (TextUtils.isEmpty(str)) {
                return;
            }
            context.getSharedPreferences("hailiang_loadremote_config", 0).edit().putString("aisdk_lib_version", str).apply();
        } catch (Throwable unused) {
        }
    }

    public static void d(com.hailiang.advlib.core.QMConfig r11) {
        throw new UnsupportedOperationException("Method not decompiled: dc.f.d(com.hailiang.advlib.core.QMConfig):void");
    }

    public static void e(String str) throws ClassNotFoundException {
        g = null;
        a.a().d("loadD");
        g = new a(f + "/" + str, e, (String) null, f.class.getClassLoader());
        a.a().h("loadD");
        g.a(f2349r.e());
        q();
    }

    public static void f(Throwable th, boolean z, boolean z4) {
        d.a(new c(th, z, z4), 100L);
    }

    public static void g(JSONObject jSONObject) {
        if (!y() && t <= 2) {
            try {
                if (f == null || e == null) {
                    v(k);
                }
                new a(f + "/" + b, e, (String) null, f.class.getClassLoader());
                t = 0;
                if (jSONObject.has("version")) {
                    c(k, jSONObject.getString("version"));
                }
            } catch (Throwable unused) {
                t++;
                d.a(new a(jSONObject), VideoLiveManager$PlayCacheSyncRunner.CacheThreadshold);
            }
        }
    }

    public static void h(boolean z, boolean z4) {
        d.a(new d(z, z4, System.currentTimeMillis() - j), 100L);
        if (x()) {
            return;
        }
        h.decrementAndGet();
    }

    public static boolean j(QMConfig qMConfig, @NonNull b bVar) {
        qMConfig.getVersionName();
        f2349r = bVar;
        if (h.getAndIncrement() > 0) {
            return false;
        }
        Context context = qMConfig.getContext();
        k = context;
        d.a(context);
        j = System.currentTimeMillis();
        d(qMConfig);
        return false;
    }

    public static boolean k(String str, String str2) {
        try {
            return str.compareTo(str2) >= 0;
        } catch (Throwable unused) {
            return false;
        }
    }

    public static String m(Throwable th) {
        try {
            StringWriter stringWriter = new StringWriter();
            th.printStackTrace(new PrintWriter(stringWriter));
            return URLEncoder.encode(stringWriter.toString(), "UTF-8");
        } catch (Throwable unused) {
            return "";
        }
    }

    public static void n(QMConfig qMConfig) {
        d.a(new b(qMConfig), 100L);
    }

    public static String p(Context context) {
        try {
            SharedPreferences sharedPreferences = context.getSharedPreferences("hailiang_loadremote_config", 0);
            String string = sharedPreferences.getString("ruid", "");
            if (!TextUtils.isEmpty(string)) {
                return string;
            }
            String uuid = UUID.randomUUID().toString();
            sharedPreferences.edit().putString("ruid", uuid).apply();
            return uuid;
        } catch (Throwable unused) {
            return "";
        }
    }

    public static void q() {
        Context context = k;
        if (context == null) {
            return;
        }
        SharedPreferences sharedPreferences = context.getSharedPreferences("hailiang_loadremote_config", 0);
        if (TextUtils.equals(sharedPreferences.getString("lastLoadDexVersion", ""), o)) {
            s = false;
        } else {
            s = true;
            sharedPreferences.edit().putString("lastLoadDexVersion", o).apply();
        }
    }

    public static int[] r(Context context) {
        try {
            SharedPreferences sharedPreferences = context.getSharedPreferences("hailiang_loadremote_config", 0);
            m = sharedPreferences.getString("aisdk_lib_local", "1.0");
            f2346n = sharedPreferences.getString("aisdk_lib_version", "1.0");
            return new int[]{k(m, "3.470") ? 1 : 0, k(f2346n, "3.470") ? 1 : 0};
        } catch (Throwable th) {
            d.a(context, th.getMessage());
            return new int[]{0, 0};
        }
    }

    public static Map<String, String> s() {
        HashMap hashMap = new HashMap();
        try {
            hashMap.put("opt_isRemote", (f2348q ? 1 : 0) + "");
            hashMap.put("opt_local_version", m);
            hashMap.put("opt_remote_version", f2346n);
            hashMap.put("opt_is_update", "1");
            hashMap.put("opt_channel", "hailiang");
            hashMap.put("opt_is_androidx", String.valueOf(e.a()));
            hashMap.put("opt_new_inside_version", "13.436");
            hashMap.put("opt_load_version", o);
            hashMap.put("opt_time", System.currentTimeMillis() + "");
            hashMap.put("opt_location", String.valueOf(f2347p));
            hashMap.put("opt_lib_pkgname", dc.c.a());
            hashMap.put("opt_is_first_load", String.valueOf(s));
        } catch (Throwable th) {
            th.printStackTrace();
        }
        return hashMap;
    }

    public static boolean t(Context context) {
        if (context != null && context.getApplicationContext() != null) {
            try {
                return context.getApplicationContext().getPackageName().equals(e.c(context));
            } catch (Throwable unused) {
            }
        }
        return true;
    }

    public static Bundle u() {
        Bundle bundle = new Bundle();
        bundle.putString("expectedSdkVersion", o);
        bundle.putString("sdkVersion", f2349r.b());
        return bundle;
    }

    public static boolean v(Context context) {
        try {
            if (f != null) {
                return true;
            }
            f = context.getDir("qm", 0).getAbsolutePath();
            if (Build.VERSION.SDK_INT >= 21) {
                e = context.getCodeCacheDir().getAbsolutePath();
                return true;
            }
            e = context.getFilesDir().getAbsolutePath();
            return true;
        } catch (NullPointerException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    public static void w(Context context) {
        try {
            context.getSharedPreferences("hailiang_loadremote_config", 0).edit().putString("aisdk_lib_local", "3.470").apply();
        } catch (Throwable unused) {
        }
    }

    public static boolean x() {
        return g != null && g.b();
    }

    public static boolean y() {
        try {
            return Build.VERSION.SDK_INT <= 22;
        } catch (Throwable th) {
            th.printStackTrace();
            return false;
        }
    }

    public static void z() {
        try {
            File file = new File(f + "/" + a);
            try {
                if (file.exists()) {
                    file.delete();
                }
            } catch (Throwable unused) {
            }
            InputStream open = k.getAssets().open(f2349r.c());
            FileOutputStream fileOutputStream = new FileOutputStream(file);
            e.b(open, fileOutputStream);
            fileOutputStream.close();
            open.close();
            file.setReadOnly();
            f2344d = a;
            o = "3.470";
            f2348q = false;
            w(k);
        } catch (IOException e2) {
            e2.printStackTrace();
        } catch (Throwable unused2) {
        }
        f2344d = a;
        o = "3.470";
    }
}