翰林优商.apk(点击下载) / u2.java


package com.kuaishou.weapon.p0;

import android.os.Build;
import com.kuaishou.weapon.p0.jni.Engine;
import java.lang.reflect.Method;

public class u2 {
    public static int a;
    public static boolean b;

    public u2() {
        b();
    }

    private int a(Method method) {
        try {
            int i = a;
            if (i <= 1 || method == null) {
                return 0;
            }
            return Engine.mmo(method, i, method.getModifiers());
        } catch (Exception unused) {
            return 0;
        }
    }

    private void b() {
        if (Engine.loadSuccess && !b) {
            boolean b2 = s2.b();
            int i = Build.VERSION.SDK_INT;
            if (b2 && i < 29 && i > 22) {
                a = Engine.off();
            }
            b = true;
        }
    }

    private boolean c() {
        return b && a > 1;
    }

    public int a() {
        if (!c()) {
            return -1;
        }
        long b2 = r2.d.b();
        long b3 = r2.c.b();
        if (((long) a) == b2) {
            return (int) b3;
        }
        return -1;
    }

    public int a(int i, Class cls, String str, Object... objArr) {
        Method a2;
        try {
            if (!c() || (a2 = h3.a(cls, str, objArr)) == null) {
                return 0;
            }
            return Engine.mqc(a2, i);
        } catch (Exception unused) {
            return 0;
        }
    }

    public int a(Class cls, String str, Object... objArr) {
        try {
            if (c()) {
                return a(h3.a(cls, str, objArr));
            }
            return 0;
        } catch (Exception unused) {
            return 0;
        }
    }
}