导航菜单

页面标题

页面副标题

CashVia v1.6.02 - e.java 源代码

正在查看: CashVia v1.6.02 应用的 e.java JAVA 源代码文件

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


package Q1;

import D2.AbstractC0050x;
import J0.t;
import a3d20241011.M;
import android.net.TrafficStats;
import android.text.TextUtils;
import android.util.Log;
import g1.p;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.Pattern;
import m1.C0196g;
import org.json.JSONException;
import org.json.JSONObject;

public final class e implements f {
    public static final Object m = new Object();
    public final C0196g a;
    public final S1.c b;
    public final T.d c;
    public final l d;
    public final r1.l e;
    public final j f;
    public final Object g;
    public final ExecutorService h;
    public final Executor i;
    public String j;
    public final HashSet k;
    public final ArrayList l;

    static {
        new AtomicInteger(1);
    }

    public e(C0196g c0196g, P1.b bVar, ExecutorService executorService, s1.i iVar) {
        c0196g.a();
        S1.c cVar = new S1.c(c0196g.a, bVar);
        T.d dVar = new T.d(c0196g);
        if (t1.d.b == null) {
            t1.d.b = new t1.d(4);
        }
        t1.d dVar2 = t1.d.b;
        if (l.d == null) {
            l.d = new l(dVar2);
        }
        l lVar = l.d;
        r1.l lVar2 = new r1.l(new b(c0196g, 0));
        j jVar = new j();
        this.g = new Object();
        this.k = new HashSet();
        this.l = new ArrayList();
        this.a = c0196g;
        this.b = cVar;
        this.c = dVar;
        this.d = lVar;
        this.e = lVar2;
        this.f = jVar;
        this.h = executorService;
        this.i = iVar;
    }

    public static e e() {
        return (e) C0196g.c().b(f.class);
    }

    public final void a(k kVar) {
        synchronized (this.g) {
            this.l.add(kVar);
        }
    }

    public final void b() {
        R1.b r;
        synchronized (m) {
            try {
                C0196g c0196g = this.a;
                c0196g.a();
                T.d a = T.d.a(c0196g.a);
                try {
                    r = this.c.r();
                    int i = r.b;
                    if (i == 2 || i == 1) {
                        String i4 = i(r);
                        T.d dVar = this.c;
                        R1.a a4 = r.a();
                        a4.b = i4;
                        a4.a = 3;
                        r = a4.j();
                        dVar.m(r);
                    }
                    if (a != null) {
                        a.s();
                    }
                } catch (Throwable th) {
                    if (a != null) {
                        a.s();
                    }
                    throw th;
                }
            } catch (Throwable th2) {
                throw th2;
            }
        }
        l(r);
        this.i.execute(new d(this));
    }

    public final R1.b c(R1.b bVar) {
        int responseCode;
        S1.b f;
        C0196g c0196g = this.a;
        c0196g.a();
        String str = c0196g.c.a;
        c0196g.a();
        String str2 = c0196g.c.g;
        String str3 = bVar.d;
        S1.c cVar = this.b;
        S1.d dVar = cVar.c;
        if (!dVar.b()) {
            throw new g("Firebase Installations Service is unavailable. Please try again later.");
        }
        URL a = S1.c.a("projects/" + str2 + "/installations/" + bVar.a + "/authTokens:generate");
        for (int i = 0; i <= 1; i++) {
            TrafficStats.setThreadStatsTag(32771);
            HttpURLConnection c = cVar.c(a, str);
            try {
                try {
                    c.setRequestMethod("POST");
                    c.addRequestProperty("Authorization", "FIS_v2 " + str3);
                    c.setDoOutput(true);
                    S1.c.h(c);
                    responseCode = c.getResponseCode();
                    dVar.d(responseCode);
                } catch (Throwable th) {
                    c.disconnect();
                    TrafficStats.clearThreadStatsTag();
                    throw th;
                }
            } catch (IOException | AssertionError unused) {
            }
            if (responseCode >= 200 && responseCode < 300) {
                f = S1.c.f(c);
            } else {
                S1.c.b(c, null, str, str2);
                if (responseCode == 401 || responseCode == 404) {
                    M0.a a4 = S1.b.a();
                    a4.c = 3;
                    f = a4.a();
                } else {
                    if (responseCode == 429) {
                        throw new g("Firebase servers have received too many requests from this client in a short period of time. Please try again later.");
                    }
                    if (responseCode < 500 || responseCode >= 600) {
                        Log.e("Firebase-Installations", "Firebase Installations can not communicate with Firebase server APIs due to invalid configuration. Please update your Firebase initialization process and set valid Firebase options (API key, Project ID, Application ID) when initializing Firebase.");
                        M0.a a5 = S1.b.a();
                        a5.c = 2;
                        f = a5.a();
                    }
                    c.disconnect();
                    TrafficStats.clearThreadStatsTag();
                }
            }
            c.disconnect();
            TrafficStats.clearThreadStatsTag();
            int f4 = M.f(f.c);
            if (f4 == 0) {
                l lVar = this.d;
                lVar.getClass();
                TimeUnit timeUnit = TimeUnit.MILLISECONDS;
                lVar.a.getClass();
                long seconds = timeUnit.toSeconds(System.currentTimeMillis());
                R1.a a6 = bVar.a();
                a6.c = f.a;
                a6.f = Long.valueOf(f.b);
                a6.g = Long.valueOf(seconds);
                return a6.j();
            }
            if (f4 == 1) {
                R1.a a7 = bVar.a();
                a7.e = "BAD CONFIG";
                a7.a = 5;
                return a7.j();
            }
            if (f4 != 2) {
                throw new g("Firebase Installations Service is unavailable. Please try again later.");
            }
            m(null);
            R1.a a8 = bVar.a();
            a8.a = 2;
            return a8.j();
        }
        throw new g("Firebase Installations Service is unavailable. Please try again later.");
    }

    public final p d() {
        String str;
        h();
        synchronized (this) {
            str = this.j;
        }
        if (str != null) {
            return L0.d.o(str);
        }
        g1.i iVar = new g1.i();
        a(new i(iVar));
        p pVar = iVar.a;
        this.h.execute(new c(this, 0));
        return pVar;
    }

    public final p f() {
        h();
        g1.i iVar = new g1.i();
        a(new h(this.d, iVar));
        this.h.execute(new c(this, 1));
        return iVar.a;
    }

    public final void g(R1.b bVar) {
        synchronized (m) {
            try {
                C0196g c0196g = this.a;
                c0196g.a();
                T.d a = T.d.a(c0196g.a);
                try {
                    this.c.m(bVar);
                    if (a != null) {
                        a.s();
                    }
                } catch (Throwable th) {
                    if (a != null) {
                        a.s();
                    }
                    throw th;
                }
            } catch (Throwable th2) {
                throw th2;
            }
        }
    }

    public final void h() {
        C0196g c0196g = this.a;
        c0196g.a();
        t.f(c0196g.c.b, "Please set your Application ID. A valid Firebase App ID is required to communicate with Firebase server APIs: It identifies your application with Firebase.Please refer to https://firebase.google.com/support/privacy/init-options.");
        c0196g.a();
        t.f(c0196g.c.g, "Please set your Project ID. A valid Firebase Project ID is required to communicate with Firebase server APIs: It identifies your application with Firebase.Please refer to https://firebase.google.com/support/privacy/init-options.");
        c0196g.a();
        t.f(c0196g.c.a, "Please set a valid API key. A Firebase API key is required to communicate with Firebase server APIs: It authenticates your project with Google.Please refer to https://firebase.google.com/support/privacy/init-options.");
        c0196g.a();
        String str = c0196g.c.b;
        Pattern pattern = l.c;
        t.a("Please set your Application ID. A valid Firebase App ID is required to communicate with Firebase server APIs: It identifies your application with Firebase.Please refer to https://firebase.google.com/support/privacy/init-options.", str.contains(":"));
        c0196g.a();
        t.a("Please set a valid API key. A Firebase API key is required to communicate with Firebase server APIs: It authenticates your project with Google.Please refer to https://firebase.google.com/support/privacy/init-options.", l.c.matcher(c0196g.c.a).matches());
    }

    public final java.lang.String i(R1.b r3) {
        throw new UnsupportedOperationException("Method not decompiled: Q1.e.i(R1.b):java.lang.String");
    }

    public final R1.b j(R1.b bVar) {
        int responseCode;
        String str = bVar.a;
        int i = 0;
        String str2 = null;
        if (str != null && str.length() == 11) {
            R1.c cVar = (R1.c) this.e.get();
            synchronized (cVar.a) {
                try {
                    String[] strArr = R1.c.c;
                    int i4 = 0;
                    while (true) {
                        if (i4 < 4) {
                            String str3 = strArr[i4];
                            String string = cVar.a.getString("|T|" + cVar.b + "|" + str3, null);
                            if (string == null || string.isEmpty()) {
                                i4++;
                            } else if (string.startsWith("{")) {
                                try {
                                    str2 = new JSONObject(string).getString("token");
                                } catch (JSONException unused) {
                                }
                            } else {
                                str2 = string;
                            }
                        }
                    }
                } finally {
                }
            }
        }
        S1.c cVar2 = this.b;
        C0196g c0196g = this.a;
        c0196g.a();
        String str4 = c0196g.c.a;
        String str5 = bVar.a;
        C0196g c0196g2 = this.a;
        c0196g2.a();
        String str6 = c0196g2.c.g;
        C0196g c0196g3 = this.a;
        c0196g3.a();
        String str7 = c0196g3.c.b;
        S1.d dVar = cVar2.c;
        if (!dVar.b()) {
            throw new g("Firebase Installations Service is unavailable. Please try again later.");
        }
        URL a = S1.c.a("projects/" + str6 + "/installations");
        S1.a aVar = cVar2;
        while (i <= 1) {
            TrafficStats.setThreadStatsTag(32769);
            HttpURLConnection c = aVar.c(a, str4);
            try {
                try {
                    c.setRequestMethod("POST");
                    c.setDoOutput(true);
                    if (str2 != null) {
                        c.addRequestProperty("x-goog-fis-android-iid-migration-auth", str2);
                    }
                    S1.c.g(c, str5, str7);
                    responseCode = c.getResponseCode();
                    dVar.d(responseCode);
                } finally {
                    c.disconnect();
                    TrafficStats.clearThreadStatsTag();
                }
            } catch (IOException | AssertionError unused2) {
            }
            if (responseCode < 200 || responseCode >= 300) {
                try {
                    S1.c.b(c, str7, str4, str6);
                } catch (IOException | AssertionError unused3) {
                    c.disconnect();
                    TrafficStats.clearThreadStatsTag();
                    i++;
                    aVar = aVar;
                }
                if (responseCode == 429) {
                    throw new g("Firebase servers have received too many requests from this client in a short period of time. Please try again later.");
                }
                if (responseCode < 500 || responseCode >= 600) {
                    Log.e("Firebase-Installations", "Firebase Installations can not communicate with Firebase server APIs due to invalid configuration. Please update your Firebase initialization process and set valid Firebase options (API key, Project ID, Application ID) when initializing Firebase.");
                    S1.a aVar2 = new S1.a(null, null, null, null, 2);
                    c.disconnect();
                    TrafficStats.clearThreadStatsTag();
                    aVar = aVar2;
                } else {
                    c.disconnect();
                    TrafficStats.clearThreadStatsTag();
                    i++;
                    aVar = aVar;
                }
            } else {
                S1.a e = S1.c.e(c);
                c.disconnect();
                TrafficStats.clearThreadStatsTag();
                aVar = e;
            }
            int f = M.f(aVar.e);
            if (f != 0) {
                if (f != 1) {
                    throw new g("Firebase Installations Service is unavailable. Please try again later.");
                }
                R1.a a4 = bVar.a();
                a4.e = "BAD CONFIG";
                a4.a = 5;
                return a4.j();
            }
            String str8 = aVar.b;
            String str9 = aVar.c;
            l lVar = this.d;
            lVar.getClass();
            TimeUnit timeUnit = TimeUnit.MILLISECONDS;
            lVar.a.getClass();
            long seconds = timeUnit.toSeconds(System.currentTimeMillis());
            S1.b bVar2 = aVar.d;
            String str10 = bVar2.a;
            long j = bVar2.b;
            R1.a a5 = bVar.a();
            a5.b = str8;
            a5.a = 4;
            a5.c = str10;
            a5.d = str9;
            a5.f = Long.valueOf(j);
            a5.g = Long.valueOf(seconds);
            return a5.j();
        }
        throw new g("Firebase Installations Service is unavailable. Please try again later.");
    }

    public final void k(Exception exc) {
        synchronized (this.g) {
            try {
                Iterator it = this.l.iterator();
                while (it.hasNext()) {
                    if (((k) it.next()).b(exc)) {
                        it.remove();
                    }
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    public final void l(R1.b bVar) {
        synchronized (this.g) {
            try {
                Iterator it = this.l.iterator();
                while (it.hasNext()) {
                    if (((k) it.next()).a(bVar)) {
                        it.remove();
                    }
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    public final synchronized void m(String str) {
        this.j = str;
    }

    public final synchronized void n(R1.b bVar, R1.b bVar2) {
        if (this.k.size() != 0 && !TextUtils.equals(bVar.a, bVar2.a)) {
            Iterator it = this.k.iterator();
            if (it.hasNext()) {
                AbstractC0050x.p(it.next());
                throw null;
            }
        }
    }
}