导航菜单

页面标题

页面副标题

Kahramaa v15.23.3 - d.java 源代码

正在查看: Kahramaa v15.23.3 应用的 d.java JAVA 源代码文件

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


package v9;

import android.annotation.SuppressLint;
import android.net.TrafficStats;
import android.util.Log;
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.ThreadFactory;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.Pattern;
import m.e1;
import org.json.JSONException;
import org.json.JSONObject;
import w6.y;
import x8.p;
import x9.a;
import y8.q;
import y9.a;
import y9.b;

public final class d implements e {

    public static final Object f14732m = new Object();

    public final q8.e f14733a;

    public final y9.c f14734b;

    public final x9.c f14735c;

    public final m f14736d;

    public final p<x9.b> f14737e;
    public final k f;

    public final Object f14738g;

    public final ExecutorService f14739h;

    public final Executor f14740i;

    public String f14741j;

    public HashSet f14742k;

    public final ArrayList f14743l;

    public class a implements ThreadFactory {

        public final AtomicInteger f14744a = new AtomicInteger(1);

        @Override
        @SuppressLint({"ThreadPoolCreation"})
        public final Thread newThread(Runnable runnable) {
            return new Thread(runnable, String.format("firebase-installations-executor-%d", Integer.valueOf(this.f14744a.getAndIncrement())));
        }
    }

    static {
        new a();
    }

    @SuppressLint({"ThreadPoolCreation"})
    public d() {
        throw null;
    }

    @SuppressLint({"ThreadPoolCreation"})
    public d(q8.e eVar, u9.b bVar, ExecutorService executorService, q qVar) {
        eVar.a();
        y9.c cVar = new y9.c(eVar.f12092a, bVar);
        x9.c cVar2 = new x9.c(eVar);
        if (q8.b.f12084w == null) {
            q8.b.f12084w = new q8.b();
        }
        q8.b bVar2 = q8.b.f12084w;
        if (m.f14753d == null) {
            m.f14753d = new m(bVar2);
        }
        m mVar = m.f14753d;
        p<x9.b> pVar = new p<>(new x8.i(1, eVar));
        k kVar = new k();
        this.f14738g = new Object();
        this.f14742k = new HashSet();
        this.f14743l = new ArrayList();
        this.f14733a = eVar;
        this.f14734b = cVar;
        this.f14735c = cVar2;
        this.f14736d = mVar;
        this.f14737e = pVar;
        this.f = kVar;
        this.f14739h = executorService;
        this.f14740i = qVar;
    }

    @Override
    public final y a() {
        d();
        w6.j jVar = new w6.j();
        h hVar = new h(this.f14736d, jVar);
        synchronized (this.f14738g) {
            this.f14743l.add(hVar);
        }
        y yVar = jVar.f14993a;
        this.f14739h.execute(new Runnable() {

            public final boolean f14729o = false;

            @Override
            public final void run() {
                d.this.b(this.f14729o);
            }
        });
        return yVar;
    }

    public final void b(final boolean r7) {
        throw new UnsupportedOperationException("Method not decompiled: v9.d.b(boolean):void");
    }

    public final x9.a c(x9.a aVar) throws f {
        boolean z;
        int responseCode;
        y9.b f;
        y9.c cVar = this.f14734b;
        q8.e eVar = this.f14733a;
        eVar.a();
        String str = eVar.f12094c.f12104a;
        String str2 = aVar.f15522b;
        q8.e eVar2 = this.f14733a;
        eVar2.a();
        String str3 = eVar2.f12094c.f12109g;
        String str4 = aVar.f15525e;
        y9.e eVar3 = cVar.f15772c;
        synchronized (eVar3) {
            if (eVar3.f15777c != 0) {
                eVar3.f15775a.f14754a.getClass();
                z = System.currentTimeMillis() > eVar3.f15776b;
            }
        }
        if (!z) {
            throw new f("Firebase Installations Service is unavailable. Please try again later.");
        }
        URL a10 = y9.c.a(String.format("projects/%s/installations/%s/authTokens:generate", str3, str2));
        for (int i10 = 0; i10 <= 1; i10++) {
            TrafficStats.setThreadStatsTag(32771);
            HttpURLConnection c7 = cVar.c(a10, str);
            try {
                c7.setRequestMethod("POST");
                c7.addRequestProperty("Authorization", "FIS_v2 " + str4);
                c7.setDoOutput(true);
                y9.c.h(c7);
                responseCode = c7.getResponseCode();
                cVar.f15772c.a(responseCode);
            } catch (IOException | AssertionError unused) {
            } catch (Throwable th) {
                c7.disconnect();
                TrafficStats.clearThreadStatsTag();
                throw th;
            }
            if (responseCode >= 200 && responseCode < 300) {
                f = y9.c.f(c7);
            } else {
                y9.c.b(c7, null, str, str3);
                if (responseCode != 401 && responseCode != 404) {
                    if (responseCode == 429) {
                        throw new f("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.");
                        b.a aVar2 = new b.a();
                        aVar2.f15766b = 0L;
                        aVar2.f15767c = 2;
                        f = aVar2.a();
                    } else {
                        c7.disconnect();
                        TrafficStats.clearThreadStatsTag();
                    }
                }
                b.a aVar3 = new b.a();
                aVar3.f15766b = 0L;
                aVar3.f15767c = 3;
                f = aVar3.a();
            }
            c7.disconnect();
            TrafficStats.clearThreadStatsTag();
            int b10 = u.g.b(f.f15764c);
            if (b10 != 0) {
                if (b10 == 1) {
                    a.C0251a h10 = aVar.h();
                    h10.f15533g = "BAD CONFIG";
                    h10.b(5);
                    return h10.a();
                }
                if (b10 != 2) {
                    throw new f("Firebase Installations Service is unavailable. Please try again later.");
                }
                synchronized (this) {
                    this.f14741j = null;
                }
                a.C0251a c0251a = new a.C0251a(aVar);
                c0251a.b(2);
                return c0251a.a();
            }
            String str5 = f.f15762a;
            long j10 = f.f15763b;
            m mVar = this.f14736d;
            mVar.getClass();
            TimeUnit timeUnit = TimeUnit.MILLISECONDS;
            mVar.f14754a.getClass();
            long seconds = timeUnit.toSeconds(System.currentTimeMillis());
            a.C0251a c0251a2 = new a.C0251a(aVar);
            c0251a2.f15530c = str5;
            c0251a2.f15532e = Long.valueOf(j10);
            c0251a2.f = Long.valueOf(seconds);
            return c0251a2.a();
        }
        throw new f("Firebase Installations Service is unavailable. Please try again later.");
    }

    public final void d() {
        q8.e eVar = this.f14733a;
        eVar.a();
        l5.m.f("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.", eVar.f12094c.f12105b);
        q8.e eVar2 = this.f14733a;
        eVar2.a();
        l5.m.f("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.", eVar2.f12094c.f12109g);
        q8.e eVar3 = this.f14733a;
        eVar3.a();
        l5.m.f("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.", eVar3.f12094c.f12104a);
        q8.e eVar4 = this.f14733a;
        eVar4.a();
        String str = eVar4.f12094c.f12105b;
        Pattern pattern = m.f14752c;
        l5.m.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(":"));
        q8.e eVar5 = this.f14733a;
        eVar5.a();
        l5.m.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.", m.f14752c.matcher(eVar5.f12094c.f12104a).matches());
    }

    public final java.lang.String e(x9.a r6) {
        throw new UnsupportedOperationException("Method not decompiled: v9.d.e(x9.a):java.lang.String");
    }

    public final x9.a f(x9.a aVar) throws f {
        ?? r10;
        boolean z;
        int responseCode;
        y9.a e10;
        String str = aVar.f15522b;
        String str2 = null;
        if (str != null && str.length() == 11) {
            x9.b bVar = this.f14737e.get();
            synchronized (bVar.f15535a) {
                String[] strArr = x9.b.f15534c;
                int i10 = 0;
                while (true) {
                    if (i10 >= 4) {
                        break;
                    }
                    String str3 = strArr[i10];
                    String string = bVar.f15535a.getString("|T|" + bVar.f15536b + "|" + str3, null);
                    if (string == null || string.isEmpty()) {
                        i10++;
                    } else if (string.startsWith("{")) {
                        try {
                            str2 = new JSONObject(string).getString("token");
                        } catch (JSONException unused) {
                        }
                    } else {
                        str2 = string;
                    }
                }
            }
        }
        y9.c cVar = this.f14734b;
        q8.e eVar = this.f14733a;
        eVar.a();
        String str4 = eVar.f12094c.f12104a;
        String str5 = aVar.f15522b;
        q8.e eVar2 = this.f14733a;
        eVar2.a();
        String str6 = eVar2.f12094c.f12109g;
        q8.e eVar3 = this.f14733a;
        eVar3.a();
        String str7 = eVar3.f12094c.f12105b;
        y9.e eVar4 = cVar.f15772c;
        synchronized (eVar4) {
            if (eVar4.f15777c != 0) {
                eVar4.f15775a.f14754a.getClass();
                z = System.currentTimeMillis() > eVar4.f15776b;
            }
        }
        if (!z) {
            throw new f("Firebase Installations Service is unavailable. Please try again later.");
        }
        URL a10 = y9.c.a(String.format("projects/%s/installations", str6));
        int i11 = 0;
        for (r10 = 1; i11 <= r10; r10 = 1) {
            TrafficStats.setThreadStatsTag(32769);
            HttpURLConnection c7 = cVar.c(a10, str4);
            try {
                try {
                    c7.setRequestMethod("POST");
                    c7.setDoOutput(r10);
                    if (str2 != null) {
                        c7.addRequestProperty("x-goog-fis-android-iid-migration-auth", str2);
                    }
                    y9.c.g(c7, str5, str7);
                    responseCode = c7.getResponseCode();
                    cVar.f15772c.a(responseCode);
                } catch (Throwable th) {
                    c7.disconnect();
                    TrafficStats.clearThreadStatsTag();
                    throw th;
                }
            } catch (IOException | AssertionError unused2) {
            }
            if (responseCode >= 200 && responseCode < 300) {
                e10 = y9.c.e(c7);
            } else {
                y9.c.b(c7, str7, str4, str6);
                if (responseCode == 429) {
                    throw new f("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.");
                    a.C0259a c0259a = new a.C0259a();
                    e10 = new y9.a(c0259a.f15758a, c0259a.f15759b, c0259a.f15760c, c0259a.f15761d, 2);
                } else {
                    c7.disconnect();
                    TrafficStats.clearThreadStatsTag();
                    i11++;
                }
            }
            c7.disconnect();
            TrafficStats.clearThreadStatsTag();
            int b10 = u.g.b(e10.f15757e);
            if (b10 != 0) {
                if (b10 != 1) {
                    throw new f("Firebase Installations Service is unavailable. Please try again later.");
                }
                a.C0251a h10 = aVar.h();
                h10.f15533g = "BAD CONFIG";
                h10.b(5);
                return h10.a();
            }
            String str8 = e10.f15754b;
            String str9 = e10.f15755c;
            m mVar = this.f14736d;
            mVar.getClass();
            TimeUnit timeUnit = TimeUnit.MILLISECONDS;
            mVar.f14754a.getClass();
            long seconds = timeUnit.toSeconds(System.currentTimeMillis());
            String b11 = e10.f15756d.b();
            long c10 = e10.f15756d.c();
            a.C0251a c0251a = new a.C0251a(aVar);
            c0251a.f15528a = str8;
            c0251a.b(4);
            c0251a.f15530c = b11;
            c0251a.f15531d = str9;
            c0251a.f15532e = Long.valueOf(c10);
            c0251a.f = Long.valueOf(seconds);
            return c0251a.a();
        }
        throw new f("Firebase Installations Service is unavailable. Please try again later.");
    }

    public final void g(Exception exc) {
        synchronized (this.f14738g) {
            Iterator it = this.f14743l.iterator();
            while (it.hasNext()) {
                if (((l) it.next()).a(exc)) {
                    it.remove();
                }
            }
        }
    }

    @Override
    public final y getId() {
        String str;
        d();
        synchronized (this) {
            str = this.f14741j;
        }
        if (str != null) {
            return w6.l.e(str);
        }
        w6.j jVar = new w6.j();
        i iVar = new i(jVar);
        synchronized (this.f14738g) {
            this.f14743l.add(iVar);
        }
        y yVar = jVar.f14993a;
        this.f14739h.execute(new e1(2, this));
        return yVar;
    }

    public final void h(x9.a aVar) {
        synchronized (this.f14738g) {
            Iterator it = this.f14743l.iterator();
            while (it.hasNext()) {
                if (((l) it.next()).b(aVar)) {
                    it.remove();
                }
            }
        }
    }
}