【好享分期】 v3.0.1版本的 MD5 值为:4dde786c0dd75e18c9b4a7360f7e9d2f

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


package c.j;

import android.content.Context;
import android.os.Build;
import com.dtf.face.config.IConstValues;
import java.io.ByteArrayOutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.UUID;
public final class u0 {
    public static boolean f5619a = true;

    public static class a implements Runnable {
        public final Context f5620a;
        public final t0 f5621b;

        public a(Context context, t0 t0Var) {
            this.f5620a = context;
            this.f5621b = t0Var;
        }

        @Override
        public final void run() {
            v0.e(this.f5620a, v2.f5639e, this.f5621b.b());
        }
    }

    public static class b implements Runnable {
        public final List f5622a;
        public final Context f5623b;

        public b(List list, Context context) {
            this.f5622a = list;
            this.f5623b = context;
        }

        @Override
        public final void run() {
            ByteArrayOutputStream byteArrayOutputStream;
            Throwable th;
            byte[] bArr = new byte[0];
            try {
                try {
                    byteArrayOutputStream = new ByteArrayOutputStream();
                    try {
                        for (t0 t0Var : this.f5622a) {
                            byteArrayOutputStream.write(t0Var.b());
                        }
                        bArr = byteArrayOutputStream.toByteArray();
                        byteArrayOutputStream.close();
                    } catch (Throwable th2) {
                        th = th2;
                        try {
                            u2.d(th, "StatisticsEntity", "applyStaticsBatch");
                            if (byteArrayOutputStream != null) {
                                byteArrayOutputStream.close();
                            }
                            v0.e(this.f5623b, v2.f5639e, bArr);
                        } catch (Throwable th3) {
                            if (byteArrayOutputStream != null) {
                                try {
                                    byteArrayOutputStream.close();
                                } catch (Throwable th4) {
                                    th4.printStackTrace();
                                }
                            }
                            throw th3;
                        }
                    }
                } catch (Throwable th5) {
                    byteArrayOutputStream = null;
                    th = th5;
                }
            } catch (Throwable th6) {
                th6.printStackTrace();
            }
            v0.e(this.f5623b, v2.f5639e, bArr);
        }
    }

    public static void a(Context context) {
        try {
            if (f(context)) {
                StringBuffer stringBuffer = new StringBuffer();
                stringBuffer.append(new SimpleDateFormat("yyyyMMdd HHmmss").format(new Date()));
                stringBuffer.append(" ");
                stringBuffer.append(UUID.randomUUID().toString());
                stringBuffer.append(" ");
                if (stringBuffer.length() != 53) {
                    return;
                }
                byte[] j2 = r2.j(stringBuffer.toString());
                byte[] e2 = e(context);
                byte[] f2 = v0.f(context, v2.f5639e);
                byte[] bArr = new byte[e2.length + f2.length];
                System.arraycopy(e2, 0, bArr, 0, e2.length);
                System.arraycopy(f2, 0, bArr, e2.length, f2.length);
                byte[] d2 = d(bArr);
                byte[] bArr2 = new byte[j2.length + d2.length];
                System.arraycopy(j2, 0, bArr2, 0, j2.length);
                System.arraycopy(d2, 0, bArr2, j2.length, d2.length);
                w2 w2Var = new w2(r2.p(bArr2), IConstValues.SUITABLE_TYPE_CHOOSE);
                k0.a();
                k0.c(w2Var);
            }
        } catch (Throwable th) {
            u2.d(th, "StatisticsManager", "updateStaticsData");
        }
    }

    public static synchronized void b(t0 t0Var, Context context) {
        synchronized (u0.class) {
            x2.h().submit(new a(context, t0Var));
        }
    }

    public static synchronized void c(List<t0> list, Context context) {
        synchronized (u0.class) {
            x2.h().submit(new b(list, context));
        }
    }

    public static byte[] d(byte[] bArr) {
        try {
            return k2.f(bArr);
        } catch (Throwable th) {
            th.printStackTrace();
            return null;
        }
    }

    public static byte[] e(Context context) {
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        byte[] bArr = new byte[0];
        try {
            r2.g(byteArrayOutputStream, "1.2.13.6");
            r2.g(byteArrayOutputStream, "Android");
            r2.g(byteArrayOutputStream, l2.x(context));
            r2.g(byteArrayOutputStream, l2.p(context));
            r2.g(byteArrayOutputStream, l2.m(context));
            r2.g(byteArrayOutputStream, Build.MANUFACTURER);
            r2.g(byteArrayOutputStream, Build.MODEL);
            r2.g(byteArrayOutputStream, Build.DEVICE);
            r2.g(byteArrayOutputStream, l2.y(context));
            r2.g(byteArrayOutputStream, i2.e(context));
            r2.g(byteArrayOutputStream, i2.f(context));
            r2.g(byteArrayOutputStream, i2.h(context));
            byteArrayOutputStream.write(new byte[]{0});
            bArr = byteArrayOutputStream.toByteArray();
            byteArrayOutputStream.close();
        } catch (Throwable th) {
            th.printStackTrace();
        }
        return bArr;
    }

    public static boolean f(Context context) {
        try {
            if (l2.t(context) == 1 && f5619a && v0.h(context, v2.f5639e) >= 30) {
                long i2 = v0.i(context, "c.log");
                long time = new Date().getTime();
                if (time - i2 < 3600000) {
                    return false;
                }
                v0.d(context, time, "c.log");
                f5619a = false;
                return true;
            }
            return false;
        } catch (Throwable th) {
            u2.d(th, "StatisticsManager", "isUpdate");
        }
        return false;
    }
}