导航菜单

页面标题

页面副标题

Kickcash v16.1 - s.java 源代码

正在查看: Kickcash v16.1 应用的 s.java JAVA 源代码文件

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


package com.microsoft.clarity.ng;

import android.content.Context;
import android.database.sqlite.SQLiteException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

final class s extends f {
    private final p E0;
    private final w0 F0;
    private final v0 G0;
    private final k H0;
    private long I0;
    private final f0 J0;
    private final f0 K0;
    private final h1 L0;
    private long M0;
    private boolean N0;
    private boolean Z;

    protected s(h hVar, j jVar) {
        super(hVar);
        com.microsoft.clarity.wf.h.j(jVar);
        this.I0 = Long.MIN_VALUE;
        this.G0 = new v0(hVar);
        this.E0 = new p(hVar);
        this.F0 = new w0(hVar);
        this.H0 = new k(hVar);
        this.L0 = new h1(A0());
        this.J0 = new t(this, hVar);
        this.K0 = new u(this, hVar);
    }

    private final long A1() {
        com.microsoft.clarity.kf.i.d();
        t1();
        try {
            return this.E0.E1();
        } catch (SQLiteException e) {
            k1("Failed to get min/max hit times from local store", e);
            return 0L;
        }
    }

    public final void C1() {
        y1(new w(this));
    }

    public final void D1() {
        try {
            this.E0.D1();
            G1();
        } catch (SQLiteException e) {
            c1("Failed to delete stale hits", e);
        }
        this.K0.h(86400000L);
    }

    private final void E1() {
        if (this.N0 || !d0.b() || this.H0.isConnected()) {
            return;
        }
        if (this.L0.c(l0.O.a().longValue())) {
            this.L0.b();
            l1("Connecting to service");
            if (this.H0.u1()) {
                l1("Connected to service");
                this.L0.a();
                u1();
            }
        }
    }

    private final boolean F1() {
        com.microsoft.clarity.kf.i.d();
        t1();
        l1("Dispatching a batch of local hits");
        boolean z = !this.H0.isConnected();
        boolean z2 = !this.F0.E1();
        if (z && z2) {
            l1("No network or service available. Will retry later");
            return false;
        }
        long max = Math.max(d0.f(), d0.g());
        ArrayList arrayList = new ArrayList();
        long j = 0;
        while (true) {
            try {
                try {
                    this.E0.m();
                    arrayList.clear();
                    try {
                        List<q0> B1 = this.E0.B1(max);
                        if (B1.isEmpty()) {
                            l1("Store is empty, nothing to dispatch");
                            I1();
                            try {
                                this.E0.V();
                                this.E0.q0();
                                return false;
                            } catch (SQLiteException e) {
                                k1("Failed to commit local dispatch transaction", e);
                                I1();
                                return false;
                            }
                        }
                        l("Hits loaded from store. count", Integer.valueOf(B1.size()));
                        Iterator<q0> it = B1.iterator();
                        while (it.hasNext()) {
                            if (it.next().f() == j) {
                                i1("Database contains successfully uploaded hit", Long.valueOf(j), Integer.valueOf(B1.size()));
                                I1();
                                try {
                                    this.E0.V();
                                    this.E0.q0();
                                    return false;
                                } catch (SQLiteException e2) {
                                    k1("Failed to commit local dispatch transaction", e2);
                                    I1();
                                    return false;
                                }
                            }
                        }
                        if (this.H0.isConnected()) {
                            l1("Service connected, sending hits to the service");
                            while (!B1.isEmpty()) {
                                q0 q0Var = B1.get(0);
                                if (!this.H0.C1(q0Var)) {
                                    break;
                                }
                                j = Math.max(j, q0Var.f());
                                B1.remove(q0Var);
                                K("Hit sent do device AnalyticsService for delivery", q0Var);
                                try {
                                    this.E0.H1(q0Var.f());
                                    arrayList.add(Long.valueOf(q0Var.f()));
                                } catch (SQLiteException e3) {
                                    k1("Failed to remove hit that was send for delivery", e3);
                                    I1();
                                    try {
                                        this.E0.V();
                                        this.E0.q0();
                                        return false;
                                    } catch (SQLiteException e4) {
                                        k1("Failed to commit local dispatch transaction", e4);
                                        I1();
                                        return false;
                                    }
                                }
                            }
                        }
                        if (this.F0.E1()) {
                            List<Long> C1 = this.F0.C1(B1);
                            Iterator<Long> it2 = C1.iterator();
                            while (it2.hasNext()) {
                                j = Math.max(j, it2.next().longValue());
                            }
                            try {
                                this.E0.z1(C1);
                                arrayList.addAll(C1);
                            } catch (SQLiteException e5) {
                                k1("Failed to remove successfully uploaded hits", e5);
                                I1();
                                try {
                                    this.E0.V();
                                    this.E0.q0();
                                    return false;
                                } catch (SQLiteException e6) {
                                    k1("Failed to commit local dispatch transaction", e6);
                                    I1();
                                    return false;
                                }
                            }
                        }
                        if (arrayList.isEmpty()) {
                            try {
                                this.E0.V();
                                this.E0.q0();
                                return false;
                            } catch (SQLiteException e7) {
                                k1("Failed to commit local dispatch transaction", e7);
                                I1();
                                return false;
                            }
                        }
                        try {
                            this.E0.V();
                            this.E0.q0();
                        } catch (SQLiteException e8) {
                            k1("Failed to commit local dispatch transaction", e8);
                            I1();
                            return false;
                        }
                    } catch (SQLiteException e9) {
                        c1("Failed to read hits from persisted store", e9);
                        I1();
                        try {
                            this.E0.V();
                            this.E0.q0();
                            return false;
                        } catch (SQLiteException e10) {
                            k1("Failed to commit local dispatch transaction", e10);
                            I1();
                            return false;
                        }
                    }
                } catch (Throwable th) {
                    this.E0.V();
                    this.E0.q0();
                    throw th;
                }
                this.E0.V();
                this.E0.q0();
                throw th;
            } catch (SQLiteException e11) {
                k1("Failed to commit local dispatch transaction", e11);
                I1();
                return false;
            }
        }
    }

    private final void H1() {
        i0 P0 = P0();
        if (P0.x1() && !P0.w1()) {
            long A1 = A1();
            if (A1 == 0 || Math.abs(A0().a() - A1) > l0.n.a().longValue()) {
                return;
            }
            l("Dispatch alarm scheduled (ms)", Long.valueOf(d0.e()));
            P0.y1();
        }
    }

    private final void I1() {
        if (this.J0.g()) {
            l1("All hits dispatched or no network/service. Going to power save mode");
        }
        this.J0.a();
        i0 P0 = P0();
        if (P0.w1()) {
            P0.u1();
        }
    }

    private final long J1() {
        long j = this.I0;
        if (j != Long.MIN_VALUE) {
            return j;
        }
        long longValue = l0.i.a().longValue();
        j1 R0 = R0();
        R0.t1();
        if (!R0.G0) {
            return longValue;
        }
        R0().t1();
        return r0.H0 * 1000;
    }

    private final void K1() {
        t1();
        com.microsoft.clarity.kf.i.d();
        this.N0 = true;
        this.H0.v1();
        G1();
    }

    private final boolean L1(String str) {
        return com.microsoft.clarity.dg.d.a(c()).a(str) == 0;
    }

    protected final void B1() {
        t1();
        com.microsoft.clarity.kf.i.d();
        Context a = z0().a();
        if (!b1.b(a)) {
            o1("AnalyticsReceiver is not registered or is disabled. Register the receiver for reliable dispatching on non-Google Play devices. See http://goo.gl/8Rd3yj for instructions.");
        } else if (!c1.i(a)) {
            p1("AnalyticsService is not registered or is disabled. Analytics service at risk of not starting. See http://goo.gl/8Rd3yj for instructions.");
        }
        if (!com.microsoft.clarity.kf.a.a(a)) {
            o1("CampaignTrackingReceiver is not registered, not exported or is disabled. Installation campaign tracking is not possible. See http://goo.gl/8Rd3yj for instructions.");
        }
        X0().v1();
        if (!L1("android.permission.ACCESS_NETWORK_STATE")) {
            p1("Missing required android.permission.ACCESS_NETWORK_STATE. Google Analytics disabled. See http://goo.gl/8Rd3yj for instructions");
            K1();
        }
        if (!L1("android.permission.INTERNET")) {
            p1("Missing required android.permission.INTERNET. Google Analytics disabled. See http://goo.gl/8Rd3yj for instructions");
            K1();
        }
        if (c1.i(c())) {
            l1("AnalyticsService registered in the app manifest and enabled");
        } else {
            o1("AnalyticsService not registered in the app manifest. Hits might not be delivered reliably. See http://goo.gl/8Rd3yj for instructions.");
        }
        if (!this.N0 && !this.E0.v1()) {
            E1();
        }
        G1();
    }

    public final void G1() {
        long min;
        com.microsoft.clarity.kf.i.d();
        t1();
        boolean z = true;
        if (!(!this.N0 && J1() > 0)) {
            this.G0.b();
            I1();
            return;
        }
        if (this.E0.v1()) {
            this.G0.b();
            I1();
            return;
        }
        if (!l0.J.a().booleanValue()) {
            this.G0.c();
            z = this.G0.a();
        }
        if (!z) {
            I1();
            H1();
            return;
        }
        H1();
        long J1 = J1();
        long w1 = X0().w1();
        if (w1 != 0) {
            min = J1 - Math.abs(A0().a() - w1);
            if (min <= 0) {
                min = Math.min(d0.d(), J1);
            }
        } else {
            min = Math.min(d0.d(), J1);
        }
        l("Dispatch scheduled (ms)", Long.valueOf(min));
        if (this.J0.g()) {
            this.J0.i(Math.max(1L, min + this.J0.f()));
        } else {
            this.J0.h(min);
        }
    }

    @Override
    protected final void s1() {
        this.E0.r1();
        this.F0.r1();
        this.H0.r1();
    }

    protected final void u1() {
        com.microsoft.clarity.kf.i.d();
        com.microsoft.clarity.kf.i.d();
        t1();
        if (!d0.b()) {
            o1("Service client disabled. Can't dispatch local hits to device AnalyticsService");
        }
        if (!this.H0.isConnected()) {
            l1("Service not connected");
            return;
        }
        if (this.E0.v1()) {
            return;
        }
        l1("Dispatching local hits to device AnalyticsService");
        while (true) {
            try {
                List<q0> B1 = this.E0.B1(d0.f());
                if (B1.isEmpty()) {
                    G1();
                    return;
                }
                while (!B1.isEmpty()) {
                    q0 q0Var = B1.get(0);
                    if (!this.H0.C1(q0Var)) {
                        G1();
                        return;
                    }
                    B1.remove(q0Var);
                    try {
                        this.E0.H1(q0Var.f());
                    } catch (SQLiteException e) {
                        k1("Failed to remove hit that was send for delivery", e);
                        I1();
                        return;
                    }
                }
            } catch (SQLiteException e2) {
                k1("Failed to read hits from store", e2);
                I1();
                return;
            }
        }
    }

    final void v1() {
        t1();
        com.microsoft.clarity.wf.h.n(!this.Z, "Analytics backend already started");
        this.Z = true;
        K0().a(new v(this));
    }

    public final void y1(j0 j0Var) {
        long j = this.M0;
        com.microsoft.clarity.kf.i.d();
        t1();
        long w1 = X0().w1();
        K("Dispatching local hits. Elapsed time since last dispatch (ms)", Long.valueOf(w1 != 0 ? Math.abs(A0().a() - w1) : -1L));
        E1();
        try {
            F1();
            X0().x1();
            G1();
            if (j0Var != null) {
                j0Var.a(null);
            }
            if (this.M0 != j) {
                this.G0.e();
            }
        } catch (Exception e) {
            k1("Local dispatch failed", e);
            X0().x1();
            G1();
            if (j0Var != null) {
                j0Var.a(e);
            }
        }
    }

    final void z1() {
        com.microsoft.clarity.kf.i.d();
        this.M0 = A0().a();
    }
}