导航菜单

页面标题

页面副标题

用信花 v1.1.3 - i.java 源代码

正在查看: 用信花 v1.1.3 应用的 i.java JAVA 源代码文件

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


package h1;

import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.os.Handler;
import android.os.HandlerThread;
import androidx.camera.camera2.internal.Camera2CameraImpl;
import d1.b;
import i1.k;
import i1.v;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public class i {

    public static volatile i f4005m;

    public Context f4006a;

    public String f4007b;

    public d1.e f4008c;

    public List<g> f4009d;

    public List<h> f4010e;

    public ExecutorService f4014i;

    public long f4015j;

    public boolean f4011f = false;

    public int f4012g = Camera2CameraImpl.StateCallback.CameraReopenMonitor.REOPEN_LIMIT_MS;

    public int f4013h = 1;

    public AtomicBoolean f4016k = new AtomicBoolean(false);

    public k.a f4017l = new a();

    public class a implements k.a {

        public class RunnableC0050a implements Runnable {
            public RunnableC0050a() {
            }

            @Override
            public void run() {
                i iVar = i.this;
                iVar.f4015j = v.f(iVar.f4006a, c1.f.f1196r, 100L);
                if (i.this.f4008c == null || i.this.f4008c.h() <= 0) {
                    return;
                }
                i.this.f4013h = (int) Math.ceil(r0.f4008c.h() / i.this.f4015j);
                i.this.t();
                i.this.f4011f = false;
            }
        }

        public a() {
        }

        @Override
        public void a(Activity activity) {
            try {
                if (i.this.f4014i == null || i.this.f4014i.isShutdown()) {
                    i.this.f4014i = new ThreadPoolExecutor(1, Integer.MAX_VALUE, 120L, TimeUnit.SECONDS, new LinkedBlockingDeque());
                }
                i.this.f4014i.execute(new RunnableC0050a());
            } catch (Exception e4) {
                e4.printStackTrace();
            }
        }
    }

    public class b implements Runnable {

        public final int f4020a;

        public final int f4021b;

        public final int f4022c;

        public final String f4023d;

        public final int f4024e;

        public final String f4025f;

        public final long f4026g;

        public final long f4027h;

        public final long f4028i;

        public final String f4029j;

        public final int f4030k;

        public final int f4031l;

        public final boolean f4032m;

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

            @Override
            public void run() {
                try {
                    i iVar = i.this;
                    iVar.f4015j = v.f(iVar.f4006a, c1.f.f1196r, 100L);
                    if (i.this.f4008c == null || i.this.f4008c.h() <= 0) {
                        return;
                    }
                    i.this.f4013h = (int) Math.ceil(r0.f4008c.h() / i.this.f4015j);
                    i.this.t();
                    i.this.f4011f = false;
                } catch (Exception e4) {
                    e4.printStackTrace();
                }
            }
        }

        public b(int i4, int i5, int i6, String str, int i7, String str2, long j4, long j5, long j6, String str3, int i8, int i9, boolean z4) {
            this.f4020a = i4;
            this.f4021b = i5;
            this.f4022c = i6;
            this.f4023d = str;
            this.f4024e = i7;
            this.f4025f = str2;
            this.f4026g = j4;
            this.f4027h = j5;
            this.f4028i = j6;
            this.f4029j = str3;
            this.f4030k = i8;
            this.f4031l = i9;
            this.f4032m = z4;
        }

        @Override
        public void run() {
            try {
                long f4 = v.f(i.this.f4006a, c1.f.f1197s, 600L);
                i1.o.c(c1.d.f1119f, "full params", Long.valueOf(f4), Integer.valueOf(this.f4020a), Integer.valueOf(this.f4021b), Integer.valueOf(this.f4022c), Boolean.valueOf(c1.a.f1054j0), this.f4023d, Integer.valueOf(this.f4024e));
                if (f4 != -1 && c1.a.f1054j0) {
                    g gVar = new g();
                    gVar.f3977b = this.f4025f;
                    gVar.f3983h = v.g(i.this.f4006a, c1.f.f1180c, "");
                    gVar.f3979d = c1.a.f1038b0;
                    gVar.f3980e = f.a().c();
                    gVar.f3981f = f.a().m();
                    gVar.f3982g = "2.3.6.4";
                    gVar.f3988m = this.f4020a;
                    gVar.f3989n = this.f4021b;
                    gVar.f3990o = this.f4026g;
                    gVar.f3991p = this.f4027h;
                    gVar.f3992q = this.f4028i;
                    gVar.f3993r = this.f4024e;
                    int i4 = this.f4022c;
                    gVar.f3994s = i4;
                    gVar.f3995t = i1.e.a(i4, this.f4029j);
                    gVar.f3996u = this.f4030k;
                    gVar.f3997v = this.f4023d;
                    gVar.f3998w = this.f4031l;
                    gVar.f3986k = "-1";
                    gVar.f3987l = "-1";
                    gVar.f3978c = -1;
                    gVar.f3984i = "-1";
                    gVar.f3985j = "-1";
                    int i5 = this.f4020a;
                    if ((i5 == 4) | (i5 == 11)) {
                        gVar.f3984i = f.a().l();
                        gVar.f3985j = String.valueOf(i1.h.p(i.this.f4006a));
                        if (c1.a.f1077v0 && !"-1".equals(v.g(i.this.f4006a, c1.f.F, c1.a.f1050h0))) {
                            gVar.f3978c = f.a().g(i.this.f4006a);
                        }
                        if (i1.h.q(i.this.f4006a)) {
                            gVar.f3986k = c1.a.f1050h0;
                        }
                        if (i1.h.k(i.this.f4006a)) {
                            gVar.f3987l = c1.a.f1050h0;
                        }
                        if (this.f4024e == 1) {
                            v.c(i.this.f4006a, c1.f.f1180c, "");
                        }
                    }
                    if (1 == this.f4021b && this.f4024e == 0 && this.f4020a != 4) {
                        i.c().h(gVar, true);
                    } else {
                        i.c().h(gVar, this.f4032m);
                    }
                    if (1 != this.f4020a || i.this.f4016k.getAndSet(true) || f4 == 0) {
                        return;
                    }
                    long parseLong = Long.parseLong(v.g(i.this.f4006a, c1.f.f1195q, "120"));
                    if (parseLong > 0) {
                        HandlerThread handlerThread = new HandlerThread("HandlerThread");
                        handlerThread.start();
                        new Handler(handlerThread.getLooper()).postDelayed(new a(), parseLong * 1000);
                    }
                }
            } catch (Exception e4) {
                e4.printStackTrace();
            }
        }
    }

    public class c extends g1.a {

        public final boolean f4035b;

        public final JSONObject f4036c;

        public final String f4037d;

        public c(boolean z4, JSONObject jSONObject, String str) {
            this.f4035b = z4;
            this.f4036c = jSONObject;
            this.f4037d = str;
        }

        @Override
        public void c(String str, String str2) {
            try {
                i1.o.b(c1.d.f1119f, "onFailure", str, str2);
                if (!i.this.f4011f) {
                    i.this.f4011f = true;
                    i.this.n(this.f4036c, this.f4035b, this.f4037d);
                } else if (this.f4035b) {
                    i.this.v();
                }
            } catch (Exception e4) {
                e4.printStackTrace();
            }
        }

        @Override
        public void h(String str) {
            i iVar;
            try {
                i1.o.b(c1.d.f1119f, "onSuccess", str);
                if (i1.e.h(str)) {
                    JSONObject jSONObject = new JSONObject(str);
                    if (jSONObject.optInt(c1.e.Z) == 0) {
                        if (this.f4035b) {
                            i.this.f4008c.d(i.this.f4008c.i());
                            i.y(i.this);
                            if (i.this.f4013h > 0) {
                                i.this.t();
                            }
                        }
                        i.this.m(jSONObject);
                        return;
                    }
                    if (!this.f4035b) {
                        return;
                    } else {
                        iVar = i.this;
                    }
                } else if (!this.f4035b) {
                    return;
                } else {
                    iVar = i.this;
                }
                iVar.v();
            } catch (JSONException e4) {
                e4.printStackTrace();
                if (this.f4035b) {
                    i.this.v();
                }
            }
        }
    }

    public static i c() {
        if (f4005m == null) {
            synchronized (i.class) {
                if (f4005m == null) {
                    f4005m = new i();
                }
            }
        }
        return f4005m;
    }

    public static int y(i iVar) {
        int i4 = iVar.f4013h;
        iVar.f4013h = i4 - 1;
        return i4;
    }

    public void f(int i4, int i5, String str, String str2, String str3, int i6, int i7, int i8, long j4, long j5, long j6, boolean z4, int i9) {
        ExecutorService executorService = this.f4014i;
        if (executorService == null || executorService.isShutdown()) {
            this.f4014i = new ThreadPoolExecutor(1, Integer.MAX_VALUE, 120L, TimeUnit.SECONDS, new LinkedBlockingDeque());
        }
        this.f4014i.execute(new b(i6, i7, i4, str2, i8, str3, j4, j6, j5, str, i5, i9, z4));
    }

    public void g(Context context, String str) {
        this.f4006a = context;
        this.f4007b = str;
    }

    public final void h(g gVar, boolean z4) {
        if (c1.a.f1054j0) {
            try {
                if (this.f4008c == null) {
                    this.f4008c = new d1.e(this.f4006a);
                }
                h hVar = new h();
                hVar.f4001b = "2";
                hVar.f4002c = f.a().e();
                hVar.f4003d = f.a().h();
                hVar.f4004e = v.g(this.f4006a, c1.f.f1178b, "-1");
                String g4 = v.g(this.f4006a, c1.f.f1182d, "");
                hVar.f4000a = g4;
                gVar.f3976a = g4;
                gVar.f3999x = v.g(this.f4006a, c1.f.Y, "-1");
                long f4 = v.f(this.f4006a, c1.f.M, 1L);
                if (f4 == 1) {
                    v.b(this.f4006a, c1.f.M, System.currentTimeMillis());
                    f4 = System.currentTimeMillis();
                }
                long f5 = v.f(this.f4006a, c1.f.f1197s, 600L);
                if (f5 == -1) {
                    return;
                }
                if (f5 == 0) {
                    i(hVar, gVar);
                    return;
                }
                this.f4008c.a(hVar);
                this.f4008c.c(gVar, z4);
                int i4 = gVar.f3989n;
                if (4 == i4 || 11 == i4 || System.currentTimeMillis() > f4 + (f5 * 1000)) {
                    this.f4015j = v.f(this.f4006a, c1.f.f1196r, 100L);
                    if (this.f4008c.h() > 0) {
                        this.f4013h = (int) Math.ceil(this.f4008c.h() / this.f4015j);
                        t();
                        this.f4011f = false;
                    }
                }
            } catch (Exception e4) {
                e4.printStackTrace();
            }
        }
    }

    public final void i(h hVar, g gVar) {
        try {
            ArrayList arrayList = new ArrayList();
            this.f4009d = arrayList;
            arrayList.add(gVar);
            ArrayList arrayList2 = new ArrayList();
            this.f4010e = arrayList2;
            arrayList2.add(hVar);
            o(false);
        } catch (Exception e4) {
            e4.printStackTrace();
        }
    }

    public final void m(JSONObject jSONObject) {
        JSONArray optJSONArray;
        try {
            JSONObject optJSONObject = jSONObject.optJSONObject(c1.e.f1128b0);
            if (optJSONObject != null && (optJSONArray = optJSONObject.optJSONArray(c1.e.f1130c0)) != null && optJSONArray.length() > 0) {
                String optString = ((JSONObject) optJSONArray.get(0)).optString(c1.e.f1140h0);
                if (i1.e.h(optString)) {
                    boolean optBoolean = optJSONObject.optBoolean("r5");
                    v.c(this.f4006a, c1.f.f1189k, optString);
                    v.d(this.f4006a, c1.f.f1186h, optBoolean);
                    if (optBoolean) {
                        c1.a.f1064o0.add(0, optString);
                    } else if (!c1.a.f1064o0.contains(optString)) {
                        c1.a.f1064o0.add(optString);
                    }
                }
            }
        } catch (Exception e4) {
            e4.printStackTrace();
        }
    }

    public final void n(JSONObject jSONObject, boolean z4, String str) {
        this.f4012g = v.e(this.f4006a, c1.f.f1192n, Camera2CameraImpl.StateCallback.CameraReopenMonitor.REOPEN_LIMIT_MS);
        String g4 = v.g(this.f4006a, c1.f.f1200v, "");
        if (!i1.e.h(g4)) {
            g4 = this.f4007b;
        }
        String g5 = v.g(this.f4006a, c1.f.D, "0MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJaqWkyQhbQ6EbYBFaxhfblDc3wmzSV27D/CncV6b1dG9DW/9rPqKLP9TvpcxA8OTgQR/WZ1YKwtcHJurR83spkCAwEAAQ==");
        if (i1.e.g(str)) {
            str = i1.d.a();
        }
        if (i1.e.h(g4)) {
            Map<String, Object> c4 = g1.g.a().c(g4, str, jSONObject, this.f4006a);
            g1.b bVar = new g1.b(c1.e.f1137g, this.f4006a);
            i1.o.b(c1.d.f1119f, "map", c4);
            bVar.e(c4, new c(z4, jSONObject, str), Boolean.TRUE, g5);
        }
    }

    public final void o(boolean z4) {
        if (this.f4009d.size() <= 0 || this.f4010e.size() <= 0) {
            return;
        }
        JSONArray d2 = i1.b.d(this.f4009d);
        JSONArray f4 = i1.b.f(this.f4010e);
        JSONObject jSONObject = new JSONObject();
        Object jSONArray = new JSONArray("[\"i4\", \"bk\",\"bp\", \"bm\", \"b2\", \"bc\", \"bh\", \"ba\", \"b7\", \"bi\", \"b8\",\"bg\", \"bj\", \"bb\", \"bl\", \"b5\", \"b1\", \"b4\", \"be\", \"b3\", \"b6\", \"bd\", \"b9\", \"bf\"]");
        Object jSONArray2 = new JSONArray("[\"i4\", \"i8\", \"i1\", \"i7\", \"i9\"]");
        jSONObject.put(b.a.G, d2);
        jSONObject.put(b.a.E, jSONArray);
        jSONObject.put(b.a.F, f4);
        jSONObject.put(b.a.D, jSONArray2);
        i1.o.b(c1.d.f1119f, "full upload", Boolean.valueOf(z4), Integer.valueOf(d2.length()), Integer.valueOf(this.f4009d.size()), Integer.valueOf(f4.length()), Integer.valueOf(this.f4010e.size()));
        if (d2.length() == 0 || f4.length() == 0) {
            return;
        }
        n(jSONObject, z4, "");
    }

    public void r() {
        try {
            if (c1.a.f1054j0 && c1.a.f1058l0) {
                long f4 = v.f(this.f4006a, c1.f.f1197s, 600L);
                String g4 = v.g(this.f4006a, c1.f.f1198t, "1");
                if (f4 == -1 || f4 == 0 || !"1".equals(g4)) {
                    return;
                }
                i1.k.a().c((Application) this.f4006a, this.f4017l);
                i1.k.a().b((Application) this.f4006a, this.f4017l);
            }
        } catch (Exception e4) {
            e4.printStackTrace();
        }
    }

    public final void t() {
        try {
            v.b(this.f4006a, c1.f.M, System.currentTimeMillis());
            this.f4009d = new ArrayList();
            this.f4009d.addAll(this.f4008c.a(String.valueOf(v.f(this.f4006a, c1.f.f1196r, 100L))));
            ArrayList arrayList = new ArrayList();
            this.f4010e = arrayList;
            arrayList.addAll(this.f4008c.a());
            o(true);
        } catch (Exception e4) {
            e4.printStackTrace();
        }
    }

    public final void v() {
        try {
            if (this.f4008c.b(this.f4012g)) {
                this.f4008c.a(String.valueOf((int) (this.f4012g * 0.1d)));
                d1.e eVar = this.f4008c;
                eVar.d(eVar.i());
            }
        } catch (Exception e4) {
            e4.printStackTrace();
        }
    }
}