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

应用版本信息
应用名称:Соседи
版本号:3.1.3
包名称:by.imlab.sosedi.kupilka

MD5 校验值:52ffe34fa08a87a6cc4bc36d7eb3dad1

反编译源代码说明

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


package zh;

import android.net.TrafficStats;
import android.text.TextUtils;
import android.util.Log;
import androidx.biometric.o;
import bh.q;
import bi.a;
import com.google.firebase.installations.FirebaseInstallationsException;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
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.LinkedBlockingQueue;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
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 tg.a0;
import u.g0;

public final class f implements g {

    public static final Object f38328m = new Object();

    public static final a f38329n = new a();

    public final wg.d f38330a;

    public final ci.c f38331b;

    public final bi.d f38332c;

    public final m f38333d;

    public final q<bi.b> f38334e;

    public final k f38335f;

    public final Object f38336g;

    public final ExecutorService f38337h;

    public final ThreadPoolExecutor f38338i;

    public String f38339j;

    public HashSet f38340k;

    public final ArrayList f38341l;

    public class a implements ThreadFactory {

        public final AtomicInteger f38342a = new AtomicInteger(1);

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

    public f() {
        throw null;
    }

    public f(final wg.d dVar, yh.b<wh.h> bVar) {
        TimeUnit timeUnit = TimeUnit.SECONDS;
        LinkedBlockingQueue linkedBlockingQueue = new LinkedBlockingQueue();
        a aVar = f38329n;
        ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(0, 1, 30L, timeUnit, linkedBlockingQueue, aVar);
        dVar.a();
        ci.c cVar = new ci.c(dVar.f36107a, bVar);
        bi.d dVar2 = new bi.d(dVar);
        if (di.a.f10994h == null) {
            di.a.f10994h = new di.a();
        }
        di.a aVar2 = di.a.f10994h;
        if (m.f38350d == null) {
            m.f38350d = new m(aVar2);
        }
        m mVar = m.f38350d;
        q<bi.b> qVar = new q<>(new yh.b() {
            @Override
            public final Object get() {
                return new bi.b(wg.d.this);
            }
        });
        k kVar = new k();
        this.f38336g = new Object();
        this.f38340k = new HashSet();
        this.f38341l = new ArrayList();
        this.f38330a = dVar;
        this.f38331b = cVar;
        this.f38332c = dVar2;
        this.f38333d = mVar;
        this.f38334e = qVar;
        this.f38335f = kVar;
        this.f38337h = threadPoolExecutor;
        this.f38338i = new ThreadPoolExecutor(0, 1, 30L, timeUnit, new LinkedBlockingQueue(), aVar);
    }

    public final void a(final boolean z10) {
        bi.a c10;
        synchronized (f38328m) {
            wg.d dVar = this.f38330a;
            dVar.a();
            b a8 = b.a(dVar.f36107a);
            try {
                c10 = this.f38332c.c();
                int i10 = c10.f3983c;
                boolean z11 = true;
                if (i10 != 2 && i10 != 1) {
                    z11 = false;
                }
            } finally {
                if (a8 != null) {
                    a8.b();
                }
            }
        }
        if (z10) {
            a.C0065a c0065a = new a.C0065a(c10);
            c0065a.f3991c = null;
            c10 = c0065a.a();
        }
        g(c10);
        this.f38338i.execute(new Runnable() {
            @Override
            public final void run() {
                b a10;
                bi.a c11;
                boolean z12;
                bi.a e10;
                boolean z13;
                boolean z14;
                boolean z15;
                f fVar = f.this;
                boolean z16 = z10;
                fVar.getClass();
                Object obj = f.f38328m;
                synchronized (obj) {
                    wg.d dVar2 = fVar.f38330a;
                    dVar2.a();
                    a10 = b.a(dVar2.f36107a);
                    try {
                        c11 = fVar.f38332c.c();
                    } finally {
                        if (a10 != null) {
                            a10.b();
                        }
                    }
                }
                try {
                    boolean z17 = true;
                    if (c11.f() == 5) {
                        z12 = true;
                    } else {
                        z12 = false;
                    }
                    if (!z12) {
                        if (c11.f() == 3) {
                            z15 = true;
                        } else {
                            z15 = false;
                        }
                        if (!z15) {
                            if (!z16 && !fVar.f38333d.a(c11)) {
                                return;
                            }
                            e10 = fVar.b(c11);
                            synchronized (obj) {
                                wg.d dVar3 = fVar.f38330a;
                                dVar3.a();
                                a10 = b.a(dVar3.f36107a);
                                try {
                                    fVar.f38332c.b(e10);
                                    if (a10 != null) {
                                        a10.b();
                                    }
                                } finally {
                                    if (a10 != null) {
                                        a10.b();
                                    }
                                }
                            }
                            synchronized (fVar) {
                                if (fVar.f38340k.size() != 0 && !TextUtils.equals(c11.f3982b, e10.f3982b)) {
                                    Iterator it = fVar.f38340k.iterator();
                                    while (it.hasNext()) {
                                        ((ai.a) it.next()).a();
                                    }
                                }
                            }
                            if (e10.f() == 4) {
                                z13 = true;
                            } else {
                                z13 = false;
                            }
                            if (z13) {
                                String str = e10.f3982b;
                                synchronized (fVar) {
                                    fVar.f38339j = str;
                                }
                            }
                            if (e10.f() == 5) {
                                z14 = true;
                            } else {
                                z14 = false;
                            }
                            if (z14) {
                                fVar.f(new FirebaseInstallationsException());
                                return;
                            }
                            int i11 = e10.f3983c;
                            if (i11 != 2 && i11 != 1) {
                                z17 = false;
                            }
                            if (z17) {
                                fVar.f(new IOException("Installation ID could not be validated with the Firebase servers (maybe it was deleted). Firebase Installations will need to create a new Installation ID and auth token. Please retry your last request."));
                                return;
                            } else {
                                fVar.g(e10);
                                return;
                            }
                        }
                    }
                    e10 = fVar.e(c11);
                    synchronized (obj) {
                    }
                } catch (FirebaseInstallationsException e11) {
                    fVar.f(e11);
                }
            }
        });
    }

    public final bi.a b(bi.a aVar) throws FirebaseInstallationsException {
        ?? r10;
        boolean z10;
        int responseCode;
        boolean z11;
        ci.b f10;
        String str;
        String str2;
        ci.c cVar = this.f38331b;
        wg.d dVar = this.f38330a;
        dVar.a();
        String str3 = dVar.f36109c.f36120a;
        String str4 = aVar.f3982b;
        wg.d dVar2 = this.f38330a;
        dVar2.a();
        String str5 = dVar2.f36109c.f36126g;
        String str6 = aVar.f3985e;
        ci.e eVar = cVar.f7638c;
        synchronized (eVar) {
            if (eVar.f7643c != 0) {
                eVar.f7641a.f38351a.getClass();
                if (System.currentTimeMillis() <= eVar.f7642b) {
                    z10 = false;
                }
            }
            z10 = true;
        }
        if (z10) {
            int i10 = 2;
            URL a8 = ci.c.a(String.format("projects/%s/installations/%s/authTokens:generate", str5, str4));
            int i11 = 0;
            for (r10 = 1; i11 <= r10; r10 = 1) {
                TrafficStats.setThreadStatsTag(32771);
                HttpURLConnection c10 = cVar.c(a8, str3);
                try {
                    try {
                        c10.setRequestMethod("POST");
                        c10.addRequestProperty("Authorization", "FIS_v2 " + str6);
                        c10.setDoOutput(r10);
                        ci.c.h(c10);
                        responseCode = c10.getResponseCode();
                        cVar.f7638c.a(responseCode);
                        if (responseCode >= 200 && responseCode < 300) {
                            z11 = true;
                        } else {
                            z11 = false;
                        }
                    } catch (IOException | AssertionError unused) {
                    }
                    if (z11) {
                        f10 = ci.c.f(c10);
                    } else {
                        ci.c.b(c10, null, str3, str5);
                        if (responseCode != 401 && responseCode != 404) {
                            if (responseCode != 429) {
                                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.");
                                    Long l10 = 0L;
                                    if (l10 == null) {
                                        str2 = " tokenExpirationTimestamp";
                                    } else {
                                        str2 = "";
                                    }
                                    if (str2.isEmpty()) {
                                        f10 = new ci.b(null, l10.longValue(), i10);
                                    } else {
                                        throw new IllegalStateException("Missing required properties:" + str2);
                                    }
                                } else {
                                    c10.disconnect();
                                    TrafficStats.clearThreadStatsTag();
                                    i11++;
                                    i10 = 2;
                                }
                            } else {
                                throw new FirebaseInstallationsException("Firebase servers have received too many requests from this client in a short period of time. Please try again later.");
                            }
                        }
                        Long l11 = 0L;
                        if (l11 == null) {
                            str = " tokenExpirationTimestamp";
                        } else {
                            str = "";
                        }
                        if (str.isEmpty()) {
                            f10 = new ci.b(null, l11.longValue(), 3);
                        } else {
                            try {
                                throw new IllegalStateException("Missing required properties:" + str);
                                break;
                            } catch (IOException | AssertionError unused2) {
                                continue;
                            }
                        }
                    }
                    c10.disconnect();
                    TrafficStats.clearThreadStatsTag();
                    int c11 = g0.c(f10.f7633c);
                    if (c11 != 0) {
                        if (c11 != 1) {
                            if (c11 == 2) {
                                synchronized (this) {
                                    this.f38339j = null;
                                }
                                a.C0065a c0065a = new a.C0065a(aVar);
                                c0065a.b(2);
                                return c0065a.a();
                            }
                            throw new FirebaseInstallationsException("Firebase Installations Service is unavailable. Please try again later.");
                        }
                        a.C0065a h10 = aVar.h();
                        h10.f3995g = "BAD CONFIG";
                        h10.b(5);
                        return h10.a();
                    }
                    String str7 = f10.f7631a;
                    long j10 = f10.f7632b;
                    m mVar = this.f38333d;
                    mVar.getClass();
                    TimeUnit timeUnit = TimeUnit.MILLISECONDS;
                    mVar.f38351a.getClass();
                    long seconds = timeUnit.toSeconds(System.currentTimeMillis());
                    a.C0065a c0065a2 = new a.C0065a(aVar);
                    c0065a2.f3991c = str7;
                    c0065a2.f3993e = Long.valueOf(j10);
                    c0065a2.f3994f = Long.valueOf(seconds);
                    return c0065a2.a();
                } catch (Throwable th2) {
                    c10.disconnect();
                    TrafficStats.clearThreadStatsTag();
                    throw th2;
                }
            }
            throw new FirebaseInstallationsException("Firebase Installations Service is unavailable. Please try again later.");
        }
        throw new FirebaseInstallationsException("Firebase Installations Service is unavailable. Please try again later.");
    }

    public final void c() {
        wg.d dVar = this.f38330a;
        dVar.a();
        kf.j.g("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.", dVar.f36109c.f36121b);
        wg.d dVar2 = this.f38330a;
        dVar2.a();
        kf.j.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.", dVar2.f36109c.f36126g);
        wg.d dVar3 = this.f38330a;
        dVar3.a();
        kf.j.g("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.", dVar3.f36109c.f36120a);
        wg.d dVar4 = this.f38330a;
        dVar4.a();
        String str = dVar4.f36109c.f36121b;
        Pattern pattern = m.f38349c;
        kf.j.b(str.contains(":"), "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.");
        wg.d dVar5 = this.f38330a;
        dVar5.a();
        kf.j.b(m.f38349c.matcher(dVar5.f36109c.f36120a).matches(), "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.");
    }

    public final String d(bi.a aVar) {
        String string;
        wg.d dVar = this.f38330a;
        dVar.a();
        if (!dVar.f36108b.equals("CHIME_ANDROID_SDK")) {
            wg.d dVar2 = this.f38330a;
            dVar2.a();
        }
        boolean z10 = true;
        if (aVar.f3983c != 1) {
            z10 = false;
        }
        if (z10) {
            bi.b bVar = this.f38334e.get();
            synchronized (bVar.f3997a) {
                synchronized (bVar.f3997a) {
                    string = bVar.f3997a.getString("|S|id", null);
                }
                if (string == null) {
                    string = bVar.a();
                }
            }
            if (TextUtils.isEmpty(string)) {
                this.f38335f.getClass();
                return k.a();
            }
            return string;
        }
        this.f38335f.getClass();
        return k.a();
    }

    public final bi.a e(bi.a aVar) throws FirebaseInstallationsException {
        boolean z10;
        int responseCode;
        boolean z11;
        ci.a e10;
        String str = aVar.f3982b;
        String str2 = null;
        if (str != null && str.length() == 11) {
            bi.b bVar = this.f38334e.get();
            synchronized (bVar.f3997a) {
                String[] strArr = bi.b.f3996c;
                int i10 = 0;
                while (true) {
                    if (i10 >= 4) {
                        break;
                    }
                    String str3 = strArr[i10];
                    String string = bVar.f3997a.getString("|T|" + bVar.f3998b + HiAnalyticsConstant.REPORT_VAL_SEPARATOR + str3, null);
                    if (string != null && !string.isEmpty()) {
                        if (string.startsWith("{")) {
                            try {
                                str2 = new JSONObject(string).getString(FirebaseMessagingService.EXTRA_TOKEN);
                            } catch (JSONException unused) {
                            }
                        } else {
                            str2 = string;
                        }
                    } else {
                        i10++;
                    }
                }
            }
        }
        ci.c cVar = this.f38331b;
        wg.d dVar = this.f38330a;
        dVar.a();
        String str4 = dVar.f36109c.f36120a;
        String str5 = aVar.f3982b;
        wg.d dVar2 = this.f38330a;
        dVar2.a();
        String str6 = dVar2.f36109c.f36126g;
        wg.d dVar3 = this.f38330a;
        dVar3.a();
        String str7 = dVar3.f36109c.f36121b;
        ci.e eVar = cVar.f7638c;
        synchronized (eVar) {
            if (eVar.f7643c != 0) {
                eVar.f7641a.f38351a.getClass();
                if (System.currentTimeMillis() <= eVar.f7642b) {
                    z10 = false;
                }
            }
            z10 = true;
        }
        if (z10) {
            URL a8 = ci.c.a(String.format("projects/%s/installations", str6));
            for (int i11 = 0; i11 <= 1; i11++) {
                TrafficStats.setThreadStatsTag(32769);
                HttpURLConnection c10 = cVar.c(a8, str4);
                try {
                    try {
                        c10.setRequestMethod("POST");
                        c10.setDoOutput(true);
                        if (str2 != null) {
                            c10.addRequestProperty("x-goog-fis-android-iid-migration-auth", str2);
                        }
                        ci.c.g(c10, str5, str7);
                        responseCode = c10.getResponseCode();
                        cVar.f7638c.a(responseCode);
                        if (responseCode >= 200 && responseCode < 300) {
                            z11 = true;
                        } else {
                            z11 = false;
                        }
                    } catch (IOException | AssertionError unused2) {
                    }
                    if (z11) {
                        e10 = ci.c.e(c10);
                        c10.disconnect();
                        TrafficStats.clearThreadStatsTag();
                    } else {
                        ci.c.b(c10, str7, str4, str6);
                        if (responseCode != 429) {
                            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.");
                                ci.a aVar2 = new ci.a(null, null, null, null, 2);
                                c10.disconnect();
                                TrafficStats.clearThreadStatsTag();
                                e10 = aVar2;
                            } else {
                                c10.disconnect();
                                TrafficStats.clearThreadStatsTag();
                            }
                        } else {
                            try {
                                throw new FirebaseInstallationsException("Firebase servers have received too many requests from this client in a short period of time. Please try again later.");
                                break;
                            } catch (IOException | AssertionError unused3) {
                                continue;
                            }
                        }
                    }
                    int c11 = g0.c(e10.f7630e);
                    if (c11 != 0) {
                        if (c11 == 1) {
                            a.C0065a h10 = aVar.h();
                            h10.f3995g = "BAD CONFIG";
                            h10.b(5);
                            return h10.a();
                        }
                        throw new FirebaseInstallationsException("Firebase Installations Service is unavailable. Please try again later.");
                    }
                    String str8 = e10.f7627b;
                    String str9 = e10.f7628c;
                    m mVar = this.f38333d;
                    mVar.getClass();
                    TimeUnit timeUnit = TimeUnit.MILLISECONDS;
                    mVar.f38351a.getClass();
                    long seconds = timeUnit.toSeconds(System.currentTimeMillis());
                    String b10 = e10.f7629d.b();
                    long c12 = e10.f7629d.c();
                    a.C0065a c0065a = new a.C0065a(aVar);
                    c0065a.f3989a = str8;
                    c0065a.b(4);
                    c0065a.f3991c = b10;
                    c0065a.f3992d = str9;
                    c0065a.f3993e = Long.valueOf(c12);
                    c0065a.f3994f = Long.valueOf(seconds);
                    return c0065a.a();
                } finally {
                    c10.disconnect();
                    TrafficStats.clearThreadStatsTag();
                }
            }
            throw new FirebaseInstallationsException("Firebase Installations Service is unavailable. Please try again later.");
        }
        throw new FirebaseInstallationsException("Firebase Installations Service is unavailable. Please try again later.");
    }

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

    public final void g(bi.a aVar) {
        synchronized (this.f38336g) {
            Iterator it = this.f38341l.iterator();
            while (it.hasNext()) {
                if (((l) it.next()).b(aVar)) {
                    it.remove();
                }
            }
        }
    }

    @Override
    public final a0 getId() {
        String str;
        c();
        synchronized (this) {
            str = this.f38339j;
        }
        if (str != null) {
            return tg.j.e(str);
        }
        tg.h hVar = new tg.h();
        i iVar = new i(hVar);
        synchronized (this.f38336g) {
            this.f38341l.add(iVar);
        }
        a0 a0Var = hVar.f32409a;
        this.f38337h.execute(new o(2, this));
        return a0Var;
    }

    @Override
    public final a0 getToken() {
        c();
        tg.h hVar = new tg.h();
        h hVar2 = new h(this.f38333d, hVar);
        synchronized (this.f38336g) {
            this.f38341l.add(hVar2);
        }
        a0 a0Var = hVar.f32409a;
        this.f38337h.execute(new Runnable() {

            public final boolean f38327b = false;

            @Override
            public final void run() {
                f.this.a(this.f38327b);
            }
        });
        return a0Var;
    }
}