Auto Clicker v1.2.3版本的 MD5 值为:67b4491115c710fe0d4b1a663324f2be

以下内容为反编译后的 e.java 源代码,内容仅作参考


package x9;

import aa.b;
import android.net.TrafficStats;
import android.text.TextUtils;
import android.util.Log;
import androidx.activity.o;
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 k7.y;
import org.json.JSONException;
import org.json.JSONObject;
import z9.a;
public final class e implements f {
    public static final Object f22034m = new Object();
    public static final a f22035n = new a();
    public final r8.d f22036a;
    public final aa.c f22037b;
    public final z9.c f22038c;
    public final m f22039d;
    public final z9.b f22040e;
    public final k f22041f;
    public final Object f22042g;
    public final ExecutorService f22043h;
    public final ThreadPoolExecutor f22044i;
    public String j;
    public final HashSet f22045k;
    public final ArrayList f22046l;

    public class a implements ThreadFactory {
        public final AtomicInteger f22047a = new AtomicInteger(1);

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

    public e(r8.d dVar, w9.b<t9.h> bVar) {
        TimeUnit timeUnit = TimeUnit.SECONDS;
        LinkedBlockingQueue linkedBlockingQueue = new LinkedBlockingQueue();
        a aVar = f22035n;
        ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(0, 1, 30L, timeUnit, linkedBlockingQueue, aVar);
        dVar.a();
        aa.c cVar = new aa.c(dVar.f19699a, bVar);
        z9.c cVar2 = new z9.c(dVar);
        if (o.r == null) {
            o.r = new o();
        }
        o oVar = o.r;
        if (m.f22055d == null) {
            m.f22055d = new m(oVar);
        }
        m mVar = m.f22055d;
        z9.b bVar2 = new z9.b(dVar);
        k kVar = new k();
        this.f22042g = new Object();
        this.f22045k = new HashSet();
        this.f22046l = new ArrayList();
        this.f22036a = dVar;
        this.f22037b = cVar;
        this.f22038c = cVar2;
        this.f22039d = mVar;
        this.f22040e = bVar2;
        this.f22041f = kVar;
        this.f22043h = threadPoolExecutor;
        this.f22044i = new ThreadPoolExecutor(0, 1, 30L, timeUnit, new LinkedBlockingQueue(), aVar);
    }

    @Override
    public final y a() {
        d();
        k7.j jVar = new k7.j();
        h hVar = new h(this.f22039d, jVar);
        synchronized (this.f22042g) {
            this.f22046l.add(hVar);
        }
        this.f22043h.execute(new Runnable() {
            public final boolean f22033s = false;

            @Override
            public final void run() {
                e.this.b(this.f22033s);
            }
        });
        return jVar.f16977a;
    }

    public final void b(final boolean z10) {
        z9.a c10;
        synchronized (f22034m) {
            r8.d dVar = this.f22036a;
            dVar.a();
            androidx.appcompat.widget.l a10 = androidx.appcompat.widget.l.a(dVar.f19699a);
            c10 = this.f22038c.c();
            int i10 = c10.f22505c;
            boolean z11 = true;
            if (i10 != 2 && i10 != 1) {
                z11 = false;
            }
            if (a10 != null) {
                a10.e();
            }
        }
        if (z10) {
            a.C0235a c0235a = new a.C0235a(c10);
            c0235a.f22513c = null;
            c10 = c0235a.a();
        }
        g(c10);
        this.f22044i.execute(new Runnable() {
            @Override
            public final void run() {
                z9.a c11;
                boolean z12;
                boolean z13;
                z9.a f10;
                boolean z14;
                boolean z15;
                boolean z16;
                e eVar = e.this;
                boolean z17 = z10;
                eVar.getClass();
                Object obj = e.f22034m;
                synchronized (obj) {
                    r8.d dVar2 = eVar.f22036a;
                    dVar2.a();
                    androidx.appcompat.widget.l a11 = androidx.appcompat.widget.l.a(dVar2.f19699a);
                    c11 = eVar.f22038c.c();
                    if (a11 != null) {
                        a11.e();
                    }
                }
                try {
                    z12 = true;
                    if (c11.f() == 5) {
                        z13 = true;
                    } else {
                        z13 = false;
                    }
                } catch (g e10) {
                    e = e10;
                }
                if (!z13) {
                    if (c11.f() == 3) {
                        z16 = true;
                    } else {
                        z16 = false;
                    }
                    if (!z16) {
                        if (!z17 && !eVar.f22039d.a(c11)) {
                            return;
                        }
                        f10 = eVar.c(c11);
                        synchronized (obj) {
                            r8.d dVar3 = eVar.f22036a;
                            dVar3.a();
                            androidx.appcompat.widget.l a12 = androidx.appcompat.widget.l.a(dVar3.f19699a);
                            eVar.f22038c.b(f10);
                            if (a12 != null) {
                                a12.e();
                            }
                        }
                        synchronized (eVar) {
                            if (eVar.f22045k.size() != 0 && !c11.f22504b.equals(f10.f22504b)) {
                                Iterator it = eVar.f22045k.iterator();
                                while (it.hasNext()) {
                                    ((y9.a) it.next()).a();
                                }
                            }
                        }
                        if (f10.f() == 4) {
                            z14 = true;
                        } else {
                            z14 = false;
                        }
                        if (z14) {
                            String str = f10.f22504b;
                            synchronized (eVar) {
                                eVar.j = str;
                            }
                        }
                        if (f10.f() == 5) {
                            z15 = true;
                        } else {
                            z15 = false;
                        }
                        if (z15) {
                            e = new g();
                        } else {
                            int i11 = f10.f22505c;
                            if (i11 != 2 && i11 != 1) {
                                z12 = false;
                            }
                            if (z12) {
                                e = 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.");
                            } else {
                                eVar.g(f10);
                                return;
                            }
                        }
                        synchronized (eVar.f22042g) {
                            Iterator it2 = eVar.f22046l.iterator();
                            while (it2.hasNext()) {
                                if (((l) it2.next()).b(e)) {
                                    it2.remove();
                                }
                            }
                        }
                        return;
                    }
                }
                f10 = eVar.f(c11);
                synchronized (obj) {
                }
            }
        });
    }

    public final z9.a c(z9.a aVar) {
        boolean z10;
        int responseCode;
        boolean z11;
        aa.b f10;
        b.a aVar2;
        r8.d dVar = this.f22036a;
        dVar.a();
        String str = dVar.f19701c.f19711a;
        String str2 = aVar.f22504b;
        r8.d dVar2 = this.f22036a;
        dVar2.a();
        String str3 = dVar2.f19701c.f19717g;
        String str4 = aVar.f22507e;
        aa.c cVar = this.f22037b;
        aa.f fVar = cVar.f254c;
        synchronized (fVar) {
            if (fVar.f259c != 0) {
                fVar.f257a.f22056a.getClass();
                if (System.currentTimeMillis() <= fVar.f258b) {
                    z10 = false;
                }
            }
            z10 = true;
        }
        if (z10) {
            URL a10 = aa.c.a(String.format("projects/%s/installations/%s/authTokens:generate", str3, str2));
            for (int i10 = 0; i10 <= 1; i10++) {
                TrafficStats.setThreadStatsTag(32771);
                HttpURLConnection c10 = cVar.c(a10, str);
                try {
                    c10.setRequestMethod("POST");
                    c10.addRequestProperty("Authorization", "FIS_v2 " + str4);
                    c10.setDoOutput(true);
                    aa.c.h(c10);
                    responseCode = c10.getResponseCode();
                    fVar.a(responseCode);
                    if (responseCode >= 200 && responseCode < 300) {
                        z11 = true;
                    } else {
                        z11 = false;
                    }
                } catch (IOException | AssertionError unused) {
                } catch (Throwable th) {
                    c10.disconnect();
                    TrafficStats.clearThreadStatsTag();
                    throw th;
                }
                if (z11) {
                    f10 = aa.c.f(c10);
                } else {
                    aa.c.b(c10, null, str, str3);
                    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.");
                                aVar2 = new b.a();
                                aVar2.f248a = 0L;
                                aVar2.f249b = 2;
                                f10 = aVar2.a();
                            } else {
                                c10.disconnect();
                                TrafficStats.clearThreadStatsTag();
                            }
                        } else {
                            throw new g("Firebase servers have received too many requests from this client in a short period of time. Please try again later.");
                        }
                    }
                    aVar2 = new b.a();
                    aVar2.f248a = 0L;
                    aVar2.f249b = 3;
                    f10 = aVar2.a();
                }
                c10.disconnect();
                TrafficStats.clearThreadStatsTag();
                int b10 = v.g.b(f10.f247c);
                if (b10 != 0) {
                    if (b10 != 1) {
                        if (b10 == 2) {
                            synchronized (this) {
                                this.j = null;
                            }
                            a.C0235a c0235a = new a.C0235a(aVar);
                            c0235a.b(2);
                            return c0235a.a();
                        }
                        throw new g("Firebase Installations Service is unavailable. Please try again later.");
                    }
                    a.C0235a h2 = aVar.h();
                    h2.f22517g = "BAD CONFIG";
                    h2.b(5);
                    return h2.a();
                }
                m mVar = this.f22039d;
                mVar.getClass();
                TimeUnit timeUnit = TimeUnit.MILLISECONDS;
                mVar.f22056a.getClass();
                long seconds = timeUnit.toSeconds(System.currentTimeMillis());
                a.C0235a c0235a2 = new a.C0235a(aVar);
                c0235a2.f22513c = f10.f245a;
                c0235a2.f22515e = Long.valueOf(f10.f246b);
                c0235a2.f22516f = Long.valueOf(seconds);
                return c0235a2.a();
            }
            throw new g("Firebase Installations Service is unavailable. Please try again later.");
        }
        throw new g("Firebase Installations Service is unavailable. Please try again later.");
    }

    public final void d() {
        r8.d dVar = this.f22036a;
        dVar.a();
        o6.l.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.", dVar.f19701c.f19712b);
        dVar.a();
        o6.l.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.", dVar.f19701c.f19717g);
        dVar.a();
        o6.l.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.", dVar.f19701c.f19711a);
        dVar.a();
        String str = dVar.f19701c.f19712b;
        Pattern pattern = m.f22054c;
        o6.l.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(":"));
        dVar.a();
        o6.l.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.f22054c.matcher(dVar.f19701c.f19711a).matches());
    }

    public final String e(z9.a aVar) {
        String string;
        r8.d dVar = this.f22036a;
        dVar.a();
        if (!dVar.f19700b.equals("CHIME_ANDROID_SDK")) {
            r8.d dVar2 = this.f22036a;
            dVar2.a();
        }
        boolean z10 = true;
        if (aVar.f22505c != 1) {
            z10 = false;
        }
        if (z10) {
            z9.b bVar = this.f22040e;
            synchronized (bVar.f22519a) {
                synchronized (bVar.f22519a) {
                    string = bVar.f22519a.getString("|S|id", null);
                }
                if (string == null) {
                    string = bVar.a();
                }
            }
            if (TextUtils.isEmpty(string)) {
                this.f22041f.getClass();
                return k.a();
            }
            return string;
        }
        this.f22041f.getClass();
        return k.a();
    }

    public final z9.a f(z9.a aVar) {
        boolean z10;
        int responseCode;
        boolean z11;
        aa.a e10;
        String str = aVar.f22504b;
        String str2 = null;
        if (str != null && str.length() == 11) {
            z9.b bVar = this.f22040e;
            synchronized (bVar.f22519a) {
                String[] strArr = z9.b.f22518c;
                int i10 = 0;
                while (true) {
                    if (i10 >= 4) {
                        break;
                    }
                    String str3 = strArr[i10];
                    String string = bVar.f22519a.getString("|T|" + bVar.f22520b + "|" + str3, null);
                    if (string != null && !string.isEmpty()) {
                        if (string.startsWith("{")) {
                            try {
                                str2 = new JSONObject(string).getString("token");
                            } catch (JSONException unused) {
                            }
                        } else {
                            str2 = string;
                        }
                    } else {
                        i10++;
                    }
                }
            }
        }
        aa.c cVar = this.f22037b;
        r8.d dVar = this.f22036a;
        dVar.a();
        String str4 = dVar.f19701c.f19711a;
        String str5 = aVar.f22504b;
        r8.d dVar2 = this.f22036a;
        dVar2.a();
        String str6 = dVar2.f19701c.f19717g;
        r8.d dVar3 = this.f22036a;
        dVar3.a();
        String str7 = dVar3.f19701c.f19712b;
        aa.f fVar = cVar.f254c;
        synchronized (fVar) {
            if (fVar.f259c != 0) {
                fVar.f257a.f22056a.getClass();
                if (System.currentTimeMillis() <= fVar.f258b) {
                    z10 = false;
                }
            }
            z10 = true;
        }
        if (z10) {
            URL a10 = aa.c.a(String.format("projects/%s/installations", str6));
            for (int i11 = 0; i11 <= 1; i11++) {
                TrafficStats.setThreadStatsTag(32769);
                HttpURLConnection c10 = cVar.c(a10, str4);
                try {
                    try {
                        c10.setRequestMethod("POST");
                        c10.setDoOutput(true);
                        if (str2 != null) {
                            c10.addRequestProperty("x-goog-fis-android-iid-migration-auth", str2);
                        }
                        aa.c.g(c10, str5, str7);
                        responseCode = c10.getResponseCode();
                        fVar.a(responseCode);
                        if (responseCode >= 200 && responseCode < 300) {
                            z11 = true;
                        } else {
                            z11 = false;
                        }
                    } catch (IOException | AssertionError unused2) {
                    }
                    if (z11) {
                        e10 = aa.c.e(c10);
                        c10.disconnect();
                        TrafficStats.clearThreadStatsTag();
                    } else {
                        aa.c.b(c10, str7, str4, str6);
                        if (responseCode != 429) {
                            if (responseCode < 500 || responseCode >= 600) {
                                try {
                                    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.");
                                    aa.a aVar2 = new aa.a(null, null, null, null, 2);
                                    c10.disconnect();
                                    TrafficStats.clearThreadStatsTag();
                                    e10 = aVar2;
                                } catch (IOException | AssertionError unused3) {
                                }
                            }
                            c10.disconnect();
                            TrafficStats.clearThreadStatsTag();
                        } else {
                            throw new g("Firebase servers have received too many requests from this client in a short period of time. Please try again later.");
                        }
                    }
                    int b10 = v.g.b(e10.f244e);
                    if (b10 != 0) {
                        if (b10 == 1) {
                            a.C0235a h2 = aVar.h();
                            h2.f22517g = "BAD CONFIG";
                            h2.b(5);
                            return h2.a();
                        }
                        throw new g("Firebase Installations Service is unavailable. Please try again later.");
                    }
                    String str8 = e10.f241b;
                    String str9 = e10.f242c;
                    m mVar = this.f22039d;
                    mVar.getClass();
                    TimeUnit timeUnit = TimeUnit.MILLISECONDS;
                    mVar.f22056a.getClass();
                    long seconds = timeUnit.toSeconds(System.currentTimeMillis());
                    String b11 = e10.f243d.b();
                    long c11 = e10.f243d.c();
                    a.C0235a c0235a = new a.C0235a(aVar);
                    c0235a.f22511a = str8;
                    c0235a.b(4);
                    c0235a.f22513c = b11;
                    c0235a.f22514d = str9;
                    c0235a.f22515e = Long.valueOf(c11);
                    c0235a.f22516f = Long.valueOf(seconds);
                    return c0235a.a();
                } finally {
                    c10.disconnect();
                    TrafficStats.clearThreadStatsTag();
                }
            }
            throw new g("Firebase Installations Service is unavailable. Please try again later.");
        }
        throw new g("Firebase Installations Service is unavailable. Please try again later.");
    }

    public final void g(z9.a aVar) {
        synchronized (this.f22042g) {
            Iterator it = this.f22046l.iterator();
            while (it.hasNext()) {
                if (((l) it.next()).a(aVar)) {
                    it.remove();
                }
            }
        }
    }

    @Override
    public final y getId() {
        String str;
        d();
        synchronized (this) {
            str = this.j;
        }
        if (str != null) {
            return k7.l.e(str);
        }
        k7.j jVar = new k7.j();
        i iVar = new i(jVar);
        synchronized (this.f22042g) {
            this.f22046l.add(iVar);
        }
        y<TResult> yVar = jVar.f16977a;
        this.f22043h.execute(new b(0, this));
        return yVar;
    }
}