APK反编译源代码展示 - 南明离火平台提供

应用版本信息
应用名称:GPS Status
版本号:11.3.314
包名称:com.eclipsim.gpsstatus2

MD5 校验值:1307767a726185fc43c57c361d8f8db9

反编译源代码说明

d.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。


package p8;

import a3.t;
import android.net.TrafficStats;
import android.text.TextUtils;
import android.util.Log;
import androidx.datastore.preferences.protobuf.Mbo.EEYY;
import b5.b0;
import ca.gbNB.sVXbwUjcR;
import com.google.android.gms.internal.play_billing.uJ.DOZVdtYNMMVhl;
import com.google.firebase.FirebaseException;
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.ExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.Pattern;
import org.json.JSONException;
import org.json.JSONObject;
import q7.k;
import r7.l;
import y5.m;

public final class d implements e {

    public static final Object f5796m = new Object();

    public final j7.g f5797a;

    public final r8.c f5798b;

    public final k6.c f5799c;

    public final j f5800d;

    public final k f5801e;

    public final h f5802f;

    public final Object f5803g;

    public final ExecutorService f5804h;

    public final l f5805i;
    public String j;

    public final HashSet f5806k;

    public final ArrayList f5807l;

    static {
        new AtomicInteger(1);
    }

    public d(j7.g gVar, o8.b bVar, ExecutorService executorService, l lVar) {
        gVar.a();
        r8.c cVar = new r8.c(gVar.f3638a, bVar);
        k6.c cVar2 = new k6.c(15, gVar);
        if (s7.b.f6487u == null) {
            s7.b.f6487u = new s7.b(23);
        }
        s7.b bVar2 = s7.b.f6487u;
        if (j.f5815d == null) {
            j.f5815d = new j(bVar2);
        }
        j jVar = j.f5815d;
        k kVar = new k(new b(0, gVar));
        ?? obj = new Object();
        this.f5803g = new Object();
        this.f5806k = new HashSet();
        this.f5807l = new ArrayList();
        this.f5797a = gVar;
        this.f5798b = cVar;
        this.f5799c = cVar2;
        this.f5800d = jVar;
        this.f5801e = kVar;
        this.f5802f = obj;
        this.f5804h = executorService;
        this.f5805i = lVar;
    }

    public static d d() {
        return (d) j7.g.c().b(e.class);
    }

    public final void a() {
        q8.b r5;
        synchronized (f5796m) {
            try {
                j7.g gVar = this.f5797a;
                gVar.a();
                k6.c d10 = k6.c.d(gVar.f3638a);
                try {
                    r5 = this.f5799c.r();
                    int i10 = r5.f6249b;
                    boolean z2 = true;
                    if (i10 != 2 && i10 != 1) {
                        z2 = false;
                    }
                    if (z2) {
                        String g2 = g(r5);
                        k6.c cVar = this.f5799c;
                        q8.a a10 = r5.a();
                        a10.f6241a = g2;
                        a10.f6242b = 3;
                        r5 = a10.a();
                        cVar.k(r5);
                    }
                    if (d10 != null) {
                        d10.s();
                    }
                } catch (Throwable th) {
                    if (d10 != null) {
                        d10.s();
                    }
                    throw th;
                }
            } catch (Throwable th2) {
                throw th2;
            }
        }
        j(r5);
        this.f5805i.execute(new c(this, 2));
    }

    public final q8.b b(q8.b bVar) {
        int responseCode;
        r8.b f10;
        j7.g gVar = this.f5797a;
        gVar.a();
        String str = gVar.f3640c.f3652a;
        String str2 = bVar.f6248a;
        j7.g gVar2 = this.f5797a;
        gVar2.a();
        String str3 = gVar2.f3640c.f3658g;
        String str4 = bVar.f6251d;
        r8.c cVar = this.f5798b;
        r8.d dVar = cVar.f6407c;
        if (!dVar.a()) {
            throw new FirebaseException("Firebase Installations Service is unavailable. Please try again later.");
        }
        URL a10 = r8.c.a("projects/" + str3 + "/installations/" + str2 + "/authTokens:generate");
        for (int i10 = 0; i10 <= 1; i10++) {
            TrafficStats.setThreadStatsTag(32771);
            HttpURLConnection c10 = cVar.c(a10, str);
            try {
                try {
                    c10.setRequestMethod("POST");
                    c10.addRequestProperty(sVXbwUjcR.wvFSrCXIrji, "FIS_v2 " + str4);
                    c10.setDoOutput(true);
                    r8.c.h(c10);
                    responseCode = c10.getResponseCode();
                    dVar.b(responseCode);
                } catch (IOException | AssertionError unused) {
                }
                if (responseCode >= 200 && responseCode < 300) {
                    f10 = r8.c.f(c10);
                } else {
                    r8.c.b(c10, null, str, str3);
                    if (responseCode == 401 || responseCode == 404) {
                        t a11 = r8.b.a();
                        a11.f160a = 3;
                        f10 = a11.b();
                    } else {
                        if (responseCode == 429) {
                            throw new FirebaseException("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.");
                            t a12 = r8.b.a();
                            a12.f160a = 2;
                            f10 = a12.b();
                        }
                        c10.disconnect();
                        TrafficStats.clearThreadStatsTag();
                    }
                }
                c10.disconnect();
                TrafficStats.clearThreadStatsTag();
                int b4 = u.h.b(f10.f6402c);
                if (b4 == 0) {
                    j jVar = this.f5800d;
                    jVar.getClass();
                    TimeUnit timeUnit = TimeUnit.MILLISECONDS;
                    jVar.f5816a.getClass();
                    long seconds = timeUnit.toSeconds(System.currentTimeMillis());
                    q8.a a13 = bVar.a();
                    a13.f6243c = f10.f6400a;
                    a13.f6245e = Long.valueOf(f10.f6401b);
                    a13.f6246f = Long.valueOf(seconds);
                    return a13.a();
                }
                if (b4 == 1) {
                    q8.a a14 = bVar.a();
                    a14.f6247g = "BAD CONFIG";
                    a14.f6242b = 5;
                    return a14.a();
                }
                if (b4 != 2) {
                    throw new FirebaseException("Firebase Installations Service is unavailable. Please try again later.");
                }
                synchronized (this) {
                    this.j = null;
                }
                q8.a a15 = bVar.a();
                a15.f6242b = 2;
                return a15.a();
            } catch (Throwable th) {
                c10.disconnect();
                TrafficStats.clearThreadStatsTag();
                throw th;
            }
        }
        throw new FirebaseException("Firebase Installations Service is unavailable. Please try again later.");
    }

    public final m c() {
        String str;
        f();
        synchronized (this) {
            try {
                str = this.j;
            } catch (Throwable th) {
                throw th;
            }
        }
        if (str != null) {
            return i7.a.i(str);
        }
        y5.g gVar = new y5.g();
        g gVar2 = new g(gVar);
        synchronized (this.f5803g) {
            try {
                this.f5807l.add(gVar2);
            } finally {
            }
        }
        m mVar = gVar.f8871a;
        this.f5804h.execute(new c(this, 0));
        return mVar;
    }

    public final m e() {
        f();
        y5.g gVar = new y5.g();
        f fVar = new f(this.f5800d, gVar);
        synchronized (this.f5803g) {
            try {
                this.f5807l.add(fVar);
            } catch (Throwable th) {
                throw th;
            }
        }
        int i10 = 2 << 1;
        this.f5804h.execute(new c(this, 1));
        return gVar.f8871a;
    }

    public final void f() {
        j7.g gVar = this.f5797a;
        gVar.a();
        b0.f(gVar.f3640c.f3653b, "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.");
        gVar.a();
        b0.f(gVar.f3640c.f3658g, "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.");
        gVar.a();
        b0.f(gVar.f3640c.f3652a, "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.");
        gVar.a();
        String str = gVar.f3640c.f3653b;
        Pattern pattern = j.f5814c;
        b0.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(":"));
        gVar.a();
        b0.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.", j.f5814c.matcher(gVar.f3640c.f3652a).matches());
    }

    public final String g(q8.b bVar) {
        String string;
        j7.g gVar = this.f5797a;
        gVar.a();
        if (!gVar.f3639b.equals("CHIME_ANDROID_SDK")) {
            j7.g gVar2 = this.f5797a;
            gVar2.a();
        }
        if (bVar.f6249b == 1) {
            q8.c cVar = (q8.c) this.f5801e.get();
            synchronized (cVar.f6256a) {
                try {
                    synchronized (cVar.f6256a) {
                        try {
                            string = cVar.f6256a.getString("|S|id", null);
                        } catch (Throwable th) {
                            throw th;
                        }
                    }
                    if (string == null) {
                        string = cVar.a();
                    }
                } catch (Throwable th2) {
                    throw th2;
                }
            }
            if (TextUtils.isEmpty(string)) {
                this.f5802f.getClass();
                string = h.a();
            }
            return string;
        }
        this.f5802f.getClass();
        return h.a();
    }

    public final q8.b h(q8.b bVar) {
        int responseCode;
        String str = bVar.f6248a;
        String str2 = null;
        if (str != null && str.length() == 11) {
            q8.c cVar = (q8.c) this.f5801e.get();
            synchronized (cVar.f6256a) {
                try {
                    String[] strArr = q8.c.f6255c;
                    int i10 = 0;
                    while (true) {
                        if (i10 < 4) {
                            String str3 = strArr[i10];
                            String string = cVar.f6256a.getString("|T|" + cVar.f6257b + "|" + str3, null);
                            if (string == null || string.isEmpty()) {
                                i10++;
                            } else if (string.startsWith("{")) {
                                try {
                                    str2 = new JSONObject(string).getString(EEYY.qFUCnFdGOziIVT);
                                } catch (JSONException unused) {
                                }
                            } else {
                                str2 = string;
                            }
                        }
                    }
                } finally {
                }
            }
        }
        r8.c cVar2 = this.f5798b;
        j7.g gVar = this.f5797a;
        gVar.a();
        String str4 = gVar.f3640c.f3652a;
        String str5 = bVar.f6248a;
        j7.g gVar2 = this.f5797a;
        gVar2.a();
        String str6 = gVar2.f3640c.f3658g;
        j7.g gVar3 = this.f5797a;
        gVar3.a();
        String str7 = gVar3.f3640c.f3653b;
        r8.d dVar = cVar2.f6407c;
        if (!dVar.a()) {
            throw new FirebaseException("Firebase Installations Service is unavailable. Please try again later.");
        }
        URL a10 = r8.c.a("projects/" + str6 + "/installations");
        int i11 = 0;
        r8.a aVar = cVar2;
        while (i11 <= 1) {
            TrafficStats.setThreadStatsTag(32769);
            HttpURLConnection c10 = aVar.c(a10, str4);
            try {
                try {
                    c10.setRequestMethod("POST");
                    c10.setDoOutput(true);
                    if (str2 != null) {
                        c10.addRequestProperty("x-goog-fis-android-iid-migration-auth", str2);
                    }
                    r8.c.g(c10, str5, str7);
                    responseCode = c10.getResponseCode();
                    dVar.b(responseCode);
                } finally {
                    c10.disconnect();
                    TrafficStats.clearThreadStatsTag();
                }
            } catch (IOException | AssertionError unused2) {
            }
            if (!(responseCode >= 200 && responseCode < 300)) {
                try {
                    r8.c.b(c10, str7, str4, str6);
                } catch (IOException | AssertionError unused3) {
                    c10.disconnect();
                    TrafficStats.clearThreadStatsTag();
                    i11++;
                    aVar = aVar;
                }
                if (responseCode == 429) {
                    throw new FirebaseException("Firebase servers have received too many requests from this client in a short period of time. Please try again later.");
                    break;
                }
                if (responseCode < 500 || responseCode >= 600) {
                    Log.e("Firebase-Installations", DOZVdtYNMMVhl.GbMTUykstpRfAO);
                    r8.a aVar2 = new r8.a(null, null, null, null, 2);
                    c10.disconnect();
                    TrafficStats.clearThreadStatsTag();
                    aVar = aVar2;
                } else {
                    c10.disconnect();
                    TrafficStats.clearThreadStatsTag();
                    i11++;
                    aVar = aVar;
                }
            } else {
                r8.a e9 = r8.c.e(c10);
                c10.disconnect();
                TrafficStats.clearThreadStatsTag();
                aVar = e9;
            }
            int b4 = u.h.b(aVar.f6399e);
            if (b4 != 0) {
                if (b4 != 1) {
                    throw new FirebaseException("Firebase Installations Service is unavailable. Please try again later.");
                }
                q8.a a11 = bVar.a();
                a11.f6247g = "BAD CONFIG";
                a11.f6242b = 5;
                return a11.a();
            }
            String str8 = aVar.f6396b;
            String str9 = aVar.f6397c;
            j jVar = this.f5800d;
            jVar.getClass();
            TimeUnit timeUnit = TimeUnit.MILLISECONDS;
            jVar.f5816a.getClass();
            long seconds = timeUnit.toSeconds(System.currentTimeMillis());
            r8.b bVar2 = aVar.f6398d;
            String str10 = bVar2.f6400a;
            long j = bVar2.f6401b;
            q8.a a12 = bVar.a();
            a12.f6241a = str8;
            a12.f6242b = 4;
            a12.f6243c = str10;
            a12.f6244d = str9;
            a12.f6245e = Long.valueOf(j);
            a12.f6246f = Long.valueOf(seconds);
            return a12.a();
        }
        throw new FirebaseException("Firebase Installations Service is unavailable. Please try again later.");
    }

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

    public final void j(q8.b bVar) {
        synchronized (this.f5803g) {
            try {
                Iterator it = this.f5807l.iterator();
                while (it.hasNext()) {
                    if (((i) it.next()).a(bVar)) {
                        it.remove();
                    }
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }
}