package G3;

import B.h;
import B0.C0016c;
import B0.s0;
import D0.C0070g;
import D0.y;
import E6.j;
import F7.C0139x;
import M4.k;
import N1.C0205f;
import N1.RunnableC0204e;
import N1.r;
import O1.C0225a;
import P2.C0253j;
import P2.InterfaceC0251h;
import P2.w;
import Z6.AbstractC0385z;
import Z6.C0369i;
import Z6.F;
import Z6.W;
import a4.ExecutorC0401d;
import android.app.Service;
import android.app.job.JobParameters;
import android.app.job.JobScheduler;
import android.content.ComponentName;
import android.content.Context;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.Typeface;
import android.os.Build;
import android.os.Bundle;
import android.os.Parcel;
import android.os.RemoteException;
import android.os.SystemClock;
import android.text.TextUtils;
import android.util.Log;
import android.util.SparseArray;
import com.google.android.gms.internal.measurement.AbstractC0725y;
import com.google.android.gms.internal.measurement.B;
import com.google.android.gms.internal.measurement.C0730z;
import com.google.android.gms.internal.measurement.C1;
import com.google.android.gms.internal.measurement.J3;
import com.google.android.gms.internal.measurement.L;
import com.google.android.gms.internal.measurement.U;
import com.google.android.gms.measurement.internal.AppMeasurementDynamiteService;
import d3.A1;
import d3.AbstractC0808o;
import d3.B0;
import d3.BinderC0841z0;
import d3.C0;
import d3.C0777d1;
import d3.C0778e;
import d3.C0782f0;
import d3.C0784g;
import d3.C0785g0;
import d3.C0786g1;
import d3.C0791i0;
import d3.C0811p;
import d3.C0814q;
import d3.C0815q0;
import d3.C0817r0;
import d3.C0824t1;
import d3.E0;
import d3.E1;
import d3.F0;
import d3.G0;
import d3.H;
import d3.I;
import d3.I0;
import d3.InterfaceC0833w1;
import d3.K;
import d3.P;
import d3.P0;
import d3.Q1;
import d3.R0;
import d3.RunnableC0798k1;
import d3.RunnableC0813p1;
import d3.S;
import d3.ServiceConnectionC0788h0;
import d3.ServiceConnectionC0821s1;
import d3.V0;
import d3.W1;
import d3.X;
import d3.X1;
import d3.Y0;
import d3.Z;
import e4.l;
import e7.AbstractC0892a;
import e7.g;
import g3.InterfaceC0985c;
import g3.d;
import g3.e;
import g3.f;
import g3.i;
import g3.m;
import g3.o;
import java.lang.reflect.InvocationTargetException;
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.EnumMap;
import java.util.Iterator;
import java.util.List;
import java.util.Objects;
import java.util.Random;
import java.util.Set;
import java.util.concurrent.CancellationException;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import n4.u0;

/* JADX INFO: loaded from: classes.dex */
public final class b implements Runnable {

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public final /* synthetic */ int f2955q;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public Object f2956r;

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public final Object f2957s;

    public b(ServiceConnectionC0788h0 serviceConnectionC0788h0, B b8, ServiceConnectionC0788h0 serviceConnectionC0788h02) {
        this.f2955q = 8;
        this.f2956r = b8;
        this.f2957s = serviceConnectionC0788h0;
    }

    private final void a() {
        BinderC0841z0 binderC0841z0 = (BinderC0841z0) this.f2957s;
        binderC0841z0.f12234e.j();
        C0778e c0778e = (C0778e) this.f2956r;
        Object objA = c0778e.f11920s.a();
        Q1 q12 = binderC0841z0.f12234e;
        if (objA == null) {
            q12.getClass();
            String str = c0778e.f11918q;
            w.f(str);
            X1 x1Z = q12.z(str);
            if (x1Z != null) {
                q12.P(c0778e, x1Z);
                return;
            }
            return;
        }
        q12.getClass();
        String str2 = c0778e.f11918q;
        w.f(str2);
        X1 x1Z2 = q12.z(str2);
        if (x1Z2 != null) {
            q12.U(c0778e, x1Z2);
        }
    }

    private final void b() {
        C0817r0 c0817r0 = (C0817r0) ((Y0) this.f2956r).f5146q;
        P pN = c0817r0.n();
        String str = pN.H;
        String str2 = (String) this.f2957s;
        boolean z8 = false;
        if (str != null && !str.equals(str2)) {
            z8 = true;
        }
        pN.H = str2;
        if (z8) {
            c0817r0.n().M();
        }
    }

    private final void c() {
        Y0 y02 = (Y0) this.f2956r;
        y02.E();
        if (Build.VERSION.SDK_INT < 30) {
            return;
        }
        C0785g0 c0785g0 = ((C0817r0) y02.f5146q).f12149x;
        C0817r0.i(c0785g0);
        SparseArray sparseArrayK = c0785g0.K();
        for (E1 e12 : (List) this.f2957s) {
            int i = e12.f11455s;
            if (!sparseArrayK.contains(i) || ((Long) sparseArrayK.get(i)).longValue() < e12.f11454r) {
                y02.c0().add(e12);
            }
        }
        y02.S();
    }

    /* JADX WARN: Removed duplicated region for block: B:14:0x0064  */
    /* JADX WARN: Removed duplicated region for block: B:21:0x0071 A[EXC_TOP_SPLITTER, SYNTHETIC] */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    private final void d() {
        Long lValueOf;
        Y0 y02 = (Y0) this.f2957s;
        A1 a1 = ((C0817r0) y02.f5146q).f12121A;
        C0817r0.j(a1);
        C0817r0 c0817r0 = (C0817r0) a1.f5146q;
        C0785g0 c0785g0 = c0817r0.f12149x;
        C0817r0.i(c0785g0);
        if (c0785g0.L().k(E0.f11448s)) {
            C0785g0 c0785g02 = c0817r0.f12149x;
            C0817r0.i(c0785g02);
            c0817r0.D.getClass();
            if (!c0785g02.N(System.currentTimeMillis())) {
                s0 s0Var = c0785g02.H;
                if (s0Var.g() != 0) {
                    lValueOf = Long.valueOf(s0Var.g());
                }
            }
            C0817r0 c0817r02 = (C0817r0) y02.f5146q;
            L l8 = (L) this.f2956r;
            if (lValueOf == null) {
                W1 w12 = c0817r02.f12122B;
                C0817r0.i(w12);
                w12.f0(l8, lValueOf.longValue());
                return;
            } else {
                try {
                    l8.m(null);
                    return;
                } catch (RemoteException e8) {
                    Z z8 = c0817r02.f12150y;
                    C0817r0.k(z8);
                    z8.f11875v.c(e8, "getSessionId failed with exception");
                    return;
                }
            }
        }
        Z z9 = c0817r0.f12150y;
        C0817r0.k(z9);
        z9.f11869A.b("Analytics storage consent denied; will not get session id");
        lValueOf = null;
        C0817r0 c0817r022 = (C0817r0) y02.f5146q;
        L l82 = (L) this.f2956r;
        if (lValueOf == null) {
        }
    }

    private final void e() {
        Y0 y02 = (Y0) this.f2957s;
        C0817r0 c0817r0 = (C0817r0) y02.f5146q;
        C0785g0 c0785g0 = c0817r0.f12149x;
        C0817r0.i(c0785g0);
        c0785g0.E();
        c0785g0.E();
        C0811p c0811pB = C0811p.b(c0785g0.J().getString("dma_consent_settings", null));
        C0811p c0811p = (C0811p) this.f2956r;
        int i = c0811pB.f12090a;
        int i5 = c0811p.f12090a;
        boolean zL = F0.l(i5, i);
        Z z8 = c0817r0.f12150y;
        if (!zL) {
            C0817r0.k(z8);
            z8.f11870B.c(Integer.valueOf(i5), "Lower precedence consent source ignored, proposed source");
            return;
        }
        SharedPreferences.Editor editorEdit = c0785g0.J().edit();
        editorEdit.putString("dma_consent_settings", c0811p.f12091b);
        editorEdit.apply();
        C0817r0.k(z8);
        z8.D.c(c0811p, "Setting DMA consent(FE)");
        C0817r0 c0817r02 = (C0817r0) y02.f5146q;
        if (c0817r02.r().Q()) {
            C0824t1 c0824t1R = c0817r02.r();
            c0824t1R.E();
            c0824t1R.F();
            c0824t1R.V(new RunnableC0798k1(c0824t1R, 1));
            return;
        }
        C0824t1 c0824t1R2 = c0817r02.r();
        c0824t1R2.E();
        c0824t1R2.F();
        if (c0824t1R2.P()) {
            c0824t1R2.V(new RunnableC0813p1(c0824t1R2, c0824t1R2.S(false), 4));
        }
    }

    private final void f() {
        Y0 y02 = ((AppMeasurementDynamiteService) this.f2957s).f10093e.f12125F;
        C0817r0.j(y02);
        C0225a c0225a = (C0225a) this.f2956r;
        y02.E();
        y02.F();
        C0225a c0225a2 = y02.f11854t;
        if (c0225a != c0225a2) {
            w.h("EventInterceptor already set.", c0225a2 == null);
        }
        y02.f11854t = c0225a;
    }

    private final void g() {
        C0824t1 c0824t1 = (C0824t1) this.f2957s;
        K k8 = c0824t1.f12179t;
        C0817r0 c0817r0 = (C0817r0) c0824t1.f5146q;
        if (k8 == null) {
            Z z8 = c0817r0.f12150y;
            C0817r0.k(z8);
            z8.f11875v.b("Failed to send current screen to service");
            return;
        }
        try {
            C0786g1 c0786g1 = (C0786g1) this.f2956r;
            if (c0786g1 == null) {
                k8.H(0L, null, null, c0817r0.f12142q.getPackageName());
            } else {
                k8.H(c0786g1.f11981c, c0786g1.f11979a, c0786g1.f11980b, c0817r0.f12142q.getPackageName());
            }
            c0824t1.U();
        } catch (RemoteException e8) {
            Z z9 = ((C0817r0) c0824t1.f5146q).f12150y;
            C0817r0.k(z9);
            z9.f11875v.c(e8, "Failed to send current screen to the service");
        }
    }

    private final void h() {
        C0824t1 c0824t1 = ((ServiceConnectionC0821s1) this.f2957s).f12173s;
        c0824t1.f12179t = null;
        if (!((C0817r0) c0824t1.f5146q).f12148w.R(null, I.p1) || ((M2.b) this.f2956r).f4155r != 7777) {
            c0824t1.T();
            return;
        }
        if (c0824t1.f12182w == null) {
            c0824t1.f12182w = Executors.newScheduledThreadPool(1);
        }
        c0824t1.f12182w.schedule(new k(16, this), ((Long) I.f11532Z.a(null)).longValue(), TimeUnit.MILLISECONDS);
    }

    private final void i() {
        Log.v("FA", "[sgtm] AppMeasurementJobService processed last Scion upload request.");
        ((InterfaceC0833w1) ((Service) ((V0) this.f2956r).f11784r)).c((JobParameters) this.f2957s);
    }

    private final void j() {
        Q1 q12 = (Q1) this.f2956r;
        q12.j();
        q12.c().E();
        if (q12.f11662F == null) {
            q12.f11662F = new ArrayList();
        }
        q12.f11662F.add((Runnable) this.f2957s);
        q12.X();
    }

    private final void k() {
        try {
            r();
        } catch (Error e8) {
            synchronized (((l) this.f2957s).f12469r) {
                ((l) this.f2957s).f12470s = 1;
                throw e8;
            }
        }
    }

    private final void l() throws IllegalAccessException, F, InvocationTargetException {
        int i = 0;
        while (true) {
            try {
                ((Runnable) this.f2956r).run();
            } catch (Throwable th) {
                AbstractC0385z.p(j.f2226q, th);
            }
            g gVar = (g) this.f2957s;
            Runnable runnableM0 = gVar.m0();
            if (runnableM0 == null) {
                return;
            }
            this.f2956r = runnableM0;
            i++;
            if (i >= 16 && AbstractC0892a.j(gVar.f12552t, gVar)) {
                AbstractC0892a.i(gVar.f12552t, gVar, this);
                return;
            }
        }
    }

    private final void m() {
        if (((o) this.f2956r).f12946d) {
            ((g3.l) this.f2957s).f12938t.m();
            return;
        }
        try {
            ((g3.l) this.f2957s).f12938t.l(((g3.l) this.f2957s).f12937s.e((o) this.f2956r));
        } catch (f e8) {
            if (e8.getCause() instanceof Exception) {
                ((g3.l) this.f2957s).f12938t.k((Exception) e8.getCause());
            } else {
                ((g3.l) this.f2957s).f12938t.k(e8);
            }
        } catch (Exception e9) {
            ((g3.l) this.f2957s).f12938t.k(e9);
        }
    }

    private final void n() {
        g3.l lVar = (g3.l) this.f2957s;
        try {
            o oVar = (o) lVar.f12937s.e((o) this.f2956r);
            if (oVar == null) {
                lVar.l(new NullPointerException("Continuation returned null"));
                return;
            }
            ExecutorC0401d executorC0401d = i.f12925b;
            oVar.c(executorC0401d, lVar);
            oVar.b(executorC0401d, lVar);
            oVar.a(executorC0401d, lVar);
        } catch (f e8) {
            if (e8.getCause() instanceof Exception) {
                lVar.f12938t.k((Exception) e8.getCause());
            } else {
                lVar.f12938t.k(e8);
            }
        } catch (Exception e9) {
            lVar.f12938t.k(e9);
        }
    }

    private final void o() {
        synchronized (((m) this.f2957s).f12941s) {
            ((InterfaceC0985c) ((m) this.f2957s).f12942t).a((o) this.f2956r);
        }
    }

    private final void p() {
        synchronized (((m) this.f2957s).f12941s) {
            try {
                d dVar = (d) ((m) this.f2957s).f12942t;
                if (dVar != null) {
                    Exception excF = ((o) this.f2956r).f();
                    w.f(excF);
                    dVar.l(excF);
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    private final void q() {
        synchronized (((m) this.f2957s).f12941s) {
            try {
                e eVar = (e) ((m) this.f2957s).f12942t;
                if (eVar != null) {
                    eVar.d(((o) this.f2956r).g());
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    /* JADX WARN: Code restructure failed: missing block: B:19:0x0043, code lost:
    
        if (r1 == false) goto L51;
     */
    /* JADX WARN: Code restructure failed: missing block: B:24:0x004c, code lost:
    
        r1 = r1 | java.lang.Thread.interrupted();
        r2 = null;
     */
    /* JADX WARN: Code restructure failed: missing block: B:25:0x004e, code lost:
    
        ((java.lang.Runnable) r10.f2956r).run();
     */
    /* JADX WARN: Code restructure failed: missing block: B:30:0x005a, code lost:
    
        r0 = move-exception;
     */
    /* JADX WARN: Code restructure failed: missing block: B:32:0x005c, code lost:
    
        r3 = move-exception;
     */
    /* JADX WARN: Code restructure failed: missing block: B:33:0x005d, code lost:
    
        e4.l.f12467v.log(java.util.logging.Level.SEVERE, "Exception while executing runnable " + ((java.lang.Runnable) r10.f2956r), (java.lang.Throwable) r3);
     */
    /* JADX WARN: Code restructure failed: missing block: B:35:0x007a, code lost:
    
        r10.f2956r = null;
     */
    /* JADX WARN: Code restructure failed: missing block: B:36:0x007c, code lost:
    
        throw r0;
     */
    /* JADX WARN: Code restructure failed: missing block: B:51:?, code lost:
    
        return;
     */
    /* JADX WARN: Removed duplicated region for block: B:47:0x003c A[SYNTHETIC] */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public void r() {
        Runnable runnable;
        boolean z8 = false;
        boolean zInterrupted = false;
        while (true) {
            try {
                synchronized (((l) this.f2957s).f12469r) {
                    if (z8) {
                        runnable = (Runnable) ((l) this.f2957s).f12469r.poll();
                        this.f2956r = runnable;
                        if (runnable != null) {
                        }
                    } else {
                        l lVar = (l) this.f2957s;
                        if (lVar.f12470s != 4) {
                            lVar.f12471t++;
                            lVar.f12470s = 4;
                            z8 = true;
                            runnable = (Runnable) ((l) this.f2957s).f12469r.poll();
                            this.f2956r = runnable;
                            if (runnable != null) {
                                ((l) this.f2957s).f12470s = 1;
                            }
                        }
                    }
                }
                if (!zInterrupted) {
                    return;
                }
            } finally {
                if (zInterrupted) {
                    Thread.currentThread().interrupt();
                }
            }
        }
    }

    /* JADX WARN: Can't wrap try/catch for region: R(16:356|(11:358|(1:363)|390|(1:392)|393|522|394|395|396|401|(5:407|(1:409)(1:410)|(1:414)|(1:416)|417))(1:364)|365|(2:367|(2:373|374)(3:370|(1:372)(0)|374))(1:375)|(5:377|(1:379)(1:380)|381|(1:383)|384)(1:385)|386|(1:388)(1:389)|390|(0)|393|522|394|395|396|401|(7:403|405|407|(0)(0)|(2:412|414)|(0)|417)(0)) */
    /* JADX WARN: Can't wrap try/catch for region: R(25:74|(1:76)(31:79|510|80|81|(1:84)(27:86|(1:88)|526|89|(7:91|(1:93)(1:95)|524|96|516|97|98)|78|102|(1:113)(4:106|(1:108)(1:109)|110|(1:112)(0))|114|(2:116|(2:118|(2:120|(2:122|(2:124|(2:126|(1:128)(1:129))(1:130))(1:131))(1:132))(1:133))(1:134))(1:135)|136|(1:138)|520|139|(1:141)(1:142)|143|(13:147|(1:149)(1:150)|151|(2:156|157)(3:514|154|157)|166|168|(1:170)(7:172|(0)(1:175)|(3:512|177|(1:179)(1:180))(0)|(2:186|(1:188)(4:189|(3:192|(1:538)(1:540)|190)|539|195))(1:195)|(1:197)(1:198)|199|(30:201|(2:203|(1:205)(1:206))|207|(1:209)|210|(2:212|(1:214)(1:215))(0)|216|(2:218|(6:223|(1:225)|226|(1:228)(2:229|(1:231)(1:232))|233|(1:235))(1:(7:222|223|(0)|226|(0)(0)|233|(0))(1:236)))(0)|237|(20:242|(1:244)|(1:276)|277|(1:279)|280|(2:286|(16:292|(2:299|(2:300|(1:532)(2:302|(2:533|304)(1:534))))|305|(0)(1:314)|315|(3:320|(1:322)|323)|324|(1:326)|327|(1:331)|332|(3:334|(7:336|(1:338)(1:339)|340|(1:342)|343|(4:347|(1:349)|350|(1:352))|353)(1:355)|354)(16:356|(11:358|(1:363)|390|(1:392)|393|522|394|395|396|401|(5:407|(1:409)(1:410)|(1:414)|(1:416)|417))(1:364)|365|(2:367|(2:373|374)(3:370|(1:372)(0)|374))(1:375)|(5:377|(1:379)(1:380)|381|(1:383)|384)(1:385)|386|(1:388)(1:389)|390|(0)|393|522|394|395|396|401|(7:403|405|407|(0)(0)|(2:412|414)|(0)|417)(0))|418|(3:420|(1:422)(1:423)|(5:425|(1:427)|428|(1:430)|431))|432|433)(1:291))(1:284)|285|315|(4:318|320|(0)|323)(0)|324|(0)|327|(2:329|331)|332|(0)(0)|418|(0)|432|433)(1:241)|245|(20:258|261|(0)(3:270|(3:273|(1:536)(1:537)|271)|535)|(0)|277|(0)|280|(3:282|286|(5:289|292|(4:295|297|299|(3:300|(0)(0)|534))|305|(1:285)(1:285))(0))(0)|315|(0)(0)|324|(0)|327|(0)|332|(0)(0)|418|(0)|432|433)(1:259)|260|(0)|277|(0)|280|(0)(0)|315|(0)(0)|324|(0)|327|(0)|332|(0)(0)|418|(0)|432|433)(2:434|435))|171|(0)(0)|(0)(0)|(0)(0)|199|(0)(0))|(3:161|(1:163)(1:164)|165)|166|168|(0)(0)|171|(0)(0)|(0)(0)|(0)(0)|199|(0)(0))|85|526|89|(0)(0)|78|102|(2:104|113)(0)|114|(0)(0)|136|(0)|520|139|(0)(0)|143|(14:145|147|(0)(0)|151|(0)(0)|166|168|(0)(0)|171|(0)(0)|(0)(0)|(0)(0)|199|(0)(0))|(0)|166|168|(0)(0)|171|(0)(0)|(0)(0)|(0)(0)|199|(0)(0))|77|78|102|(0)(0)|114|(0)(0)|136|(0)|520|139|(0)(0)|143|(0)|(0)|166|168|(0)(0)|171|(0)(0)|(0)(0)|(0)(0)|199|(0)(0)) */
    /* JADX WARN: Can't wrap try/catch for region: R(31:79|510|80|81|(1:84)(27:86|(1:88)|526|89|(7:91|(1:93)(1:95)|524|96|516|97|98)|78|102|(1:113)(4:106|(1:108)(1:109)|110|(1:112)(0))|114|(2:116|(2:118|(2:120|(2:122|(2:124|(2:126|(1:128)(1:129))(1:130))(1:131))(1:132))(1:133))(1:134))(1:135)|136|(1:138)|520|139|(1:141)(1:142)|143|(13:147|(1:149)(1:150)|151|(2:156|157)(3:514|154|157)|166|168|(1:170)(7:172|(0)(1:175)|(3:512|177|(1:179)(1:180))(0)|(2:186|(1:188)(4:189|(3:192|(1:538)(1:540)|190)|539|195))(1:195)|(1:197)(1:198)|199|(30:201|(2:203|(1:205)(1:206))|207|(1:209)|210|(2:212|(1:214)(1:215))(0)|216|(2:218|(6:223|(1:225)|226|(1:228)(2:229|(1:231)(1:232))|233|(1:235))(1:(7:222|223|(0)|226|(0)(0)|233|(0))(1:236)))(0)|237|(20:242|(1:244)|(1:276)|277|(1:279)|280|(2:286|(16:292|(2:299|(2:300|(1:532)(2:302|(2:533|304)(1:534))))|305|(0)(1:314)|315|(3:320|(1:322)|323)|324|(1:326)|327|(1:331)|332|(3:334|(7:336|(1:338)(1:339)|340|(1:342)|343|(4:347|(1:349)|350|(1:352))|353)(1:355)|354)(16:356|(11:358|(1:363)|390|(1:392)|393|522|394|395|396|401|(5:407|(1:409)(1:410)|(1:414)|(1:416)|417))(1:364)|365|(2:367|(2:373|374)(3:370|(1:372)(0)|374))(1:375)|(5:377|(1:379)(1:380)|381|(1:383)|384)(1:385)|386|(1:388)(1:389)|390|(0)|393|522|394|395|396|401|(7:403|405|407|(0)(0)|(2:412|414)|(0)|417)(0))|418|(3:420|(1:422)(1:423)|(5:425|(1:427)|428|(1:430)|431))|432|433)(1:291))(1:284)|285|315|(4:318|320|(0)|323)(0)|324|(0)|327|(2:329|331)|332|(0)(0)|418|(0)|432|433)(1:241)|245|(20:258|261|(0)(3:270|(3:273|(1:536)(1:537)|271)|535)|(0)|277|(0)|280|(3:282|286|(5:289|292|(4:295|297|299|(3:300|(0)(0)|534))|305|(1:285)(1:285))(0))(0)|315|(0)(0)|324|(0)|327|(0)|332|(0)(0)|418|(0)|432|433)(1:259)|260|(0)|277|(0)|280|(0)(0)|315|(0)(0)|324|(0)|327|(0)|332|(0)(0)|418|(0)|432|433)(2:434|435))|171|(0)(0)|(0)(0)|(0)(0)|199|(0)(0))|(3:161|(1:163)(1:164)|165)|166|168|(0)(0)|171|(0)(0)|(0)(0)|(0)(0)|199|(0)(0))|85|526|89|(0)(0)|78|102|(2:104|113)(0)|114|(0)(0)|136|(0)|520|139|(0)(0)|143|(14:145|147|(0)(0)|151|(0)(0)|166|168|(0)(0)|171|(0)(0)|(0)(0)|(0)(0)|199|(0)(0))|(0)|166|168|(0)(0)|171|(0)(0)|(0)(0)|(0)(0)|199|(0)(0)) */
    /* JADX WARN: Code restructure failed: missing block: B:100:0x023b, code lost:
    
        r2 = r19;
     */
    /* JADX WARN: Code restructure failed: missing block: B:158:0x0367, code lost:
    
        r0 = move-exception;
     */
    /* JADX WARN: Code restructure failed: missing block: B:167:0x0386, code lost:
    
        d3.C0817r0.k(r15);
        r15.f11875v.d("Fetching Google App Id failed with exception. appId", d3.Z.M(r8), r0);
     */
    /* JADX WARN: Code restructure failed: missing block: B:397:0x09f0, code lost:
    
        r2 = r22;
        r0 = r2.f11967M;
     */
    /* JADX WARN: Code restructure failed: missing block: B:398:0x09fc, code lost:
    
        if (android.text.TextUtils.isEmpty(r0.f()) == false) goto L399;
     */
    /* JADX WARN: Code restructure failed: missing block: B:399:0x09fe, code lost:
    
        d3.C0817r0.k(r21);
        r6 = r21;
        r6.f11878y.b("Remote config removed with active feature rollouts");
        r11 = null;
        r0.g(null);
     */
    /* JADX WARN: Code restructure failed: missing block: B:400:0x0a0f, code lost:
    
        r6 = r21;
     */
    /* JADX WARN: Removed duplicated region for block: B:104:0x026b  */
    /* JADX WARN: Removed duplicated region for block: B:113:0x028a  */
    /* JADX WARN: Removed duplicated region for block: B:116:0x0295  */
    /* JADX WARN: Removed duplicated region for block: B:135:0x030f  */
    /* JADX WARN: Removed duplicated region for block: B:138:0x0323  */
    /* JADX WARN: Removed duplicated region for block: B:141:0x0333  */
    /* JADX WARN: Removed duplicated region for block: B:142:0x0334  */
    /* JADX WARN: Removed duplicated region for block: B:145:0x033e A[Catch: IllegalStateException -> 0x0367, TryCatch #11 {IllegalStateException -> 0x0367, blocks: (B:139:0x0329, B:143:0x0335, B:145:0x033e, B:147:0x0344, B:151:0x0353, B:154:0x035e, B:157:0x0364, B:150:0x034f, B:161:0x036b, B:163:0x037c, B:165:0x0381, B:164:0x037f), top: B:520:0x0329 }] */
    /* JADX WARN: Removed duplicated region for block: B:149:0x034e  */
    /* JADX WARN: Removed duplicated region for block: B:150:0x034f A[Catch: IllegalStateException -> 0x0367, TryCatch #11 {IllegalStateException -> 0x0367, blocks: (B:139:0x0329, B:143:0x0335, B:145:0x033e, B:147:0x0344, B:151:0x0353, B:154:0x035e, B:157:0x0364, B:150:0x034f, B:161:0x036b, B:163:0x037c, B:165:0x0381, B:164:0x037f), top: B:520:0x0329 }] */
    /* JADX WARN: Removed duplicated region for block: B:156:0x0363  */
    /* JADX WARN: Removed duplicated region for block: B:161:0x036b A[Catch: IllegalStateException -> 0x0367, TryCatch #11 {IllegalStateException -> 0x0367, blocks: (B:139:0x0329, B:143:0x0335, B:145:0x033e, B:147:0x0344, B:151:0x0353, B:154:0x035e, B:157:0x0364, B:150:0x034f, B:161:0x036b, B:163:0x037c, B:165:0x0381, B:164:0x037f), top: B:520:0x0329 }] */
    /* JADX WARN: Removed duplicated region for block: B:170:0x03a9  */
    /* JADX WARN: Removed duplicated region for block: B:172:0x03b7  */
    /* JADX WARN: Removed duplicated region for block: B:179:0x03d8  */
    /* JADX WARN: Removed duplicated region for block: B:186:0x03f0  */
    /* JADX WARN: Removed duplicated region for block: B:195:0x041f  */
    /* JADX WARN: Removed duplicated region for block: B:197:0x0423  */
    /* JADX WARN: Removed duplicated region for block: B:198:0x042a  */
    /* JADX WARN: Removed duplicated region for block: B:201:0x0447  */
    /* JADX WARN: Removed duplicated region for block: B:215:0x0500  */
    /* JADX WARN: Removed duplicated region for block: B:221:0x051a  */
    /* JADX WARN: Removed duplicated region for block: B:225:0x0534  */
    /* JADX WARN: Removed duplicated region for block: B:228:0x0546  */
    /* JADX WARN: Removed duplicated region for block: B:229:0x054a  */
    /* JADX WARN: Removed duplicated region for block: B:235:0x0564  */
    /* JADX WARN: Removed duplicated region for block: B:276:0x0655  */
    /* JADX WARN: Removed duplicated region for block: B:279:0x0682  */
    /* JADX WARN: Removed duplicated region for block: B:282:0x0696  */
    /* JADX WARN: Removed duplicated region for block: B:286:0x06ba  */
    /* JADX WARN: Removed duplicated region for block: B:292:0x06de  */
    /* JADX WARN: Removed duplicated region for block: B:302:0x070e  */
    /* JADX WARN: Removed duplicated region for block: B:318:0x0767  */
    /* JADX WARN: Removed duplicated region for block: B:320:0x076d  */
    /* JADX WARN: Removed duplicated region for block: B:322:0x078b  */
    /* JADX WARN: Removed duplicated region for block: B:326:0x07ba  */
    /* JADX WARN: Removed duplicated region for block: B:329:0x07d4  */
    /* JADX WARN: Removed duplicated region for block: B:334:0x07ed  */
    /* JADX WARN: Removed duplicated region for block: B:356:0x085b  */
    /* JADX WARN: Removed duplicated region for block: B:373:0x08cf  */
    /* JADX WARN: Removed duplicated region for block: B:392:0x09cb  */
    /* JADX WARN: Removed duplicated region for block: B:403:0x0a20  */
    /* JADX WARN: Removed duplicated region for block: B:407:0x0a36  */
    /* JADX WARN: Removed duplicated region for block: B:409:0x0a3e  */
    /* JADX WARN: Removed duplicated region for block: B:410:0x0a41  */
    /* JADX WARN: Removed duplicated region for block: B:416:0x0a56  */
    /* JADX WARN: Removed duplicated region for block: B:420:0x0a8b  */
    /* JADX WARN: Removed duplicated region for block: B:434:0x0afc  */
    /* JADX WARN: Removed duplicated region for block: B:512:0x03c8 A[EXC_TOP_SPLITTER, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:514:0x035e A[EXC_TOP_SPLITTER, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:532:0x071d A[SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:91:0x021e A[Catch: NameNotFoundException -> 0x023b, TryCatch #14 {NameNotFoundException -> 0x023b, blocks: (B:89:0x0213, B:91:0x021e, B:93:0x022a), top: B:526:0x0213 }] */
    /* JADX WARN: Type inference failed for: r2v60, types: [d3.O0] */
    @Override // java.lang.Runnable
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void run() throws IllegalAccessException, F, InvocationTargetException {
        InterfaceC0251h interfaceC0251h;
        C0784g c0784g;
        String string;
        PackageManager packageManager;
        int i;
        String str;
        PackageInfo packageInfo;
        H h8;
        C0784g c0784g2;
        boolean z8;
        int iL;
        String strB;
        boolean z9;
        int i5;
        Bundle bundleN;
        Integer numValueOf;
        String[] stringArray;
        List<String> listAsList;
        C0777d1 c0777d1;
        boolean z10;
        long j8;
        W1 w12;
        F0 f02;
        boolean z11;
        C0 c0O;
        C0 c0O2;
        Bundle bundle;
        Boolean boolD;
        boolean z12;
        final Y0 y02;
        Bundle bundle2;
        Iterator it;
        Boolean boolP;
        long jG;
        C0791i0 c0791i0;
        W1 w13;
        String str2;
        Y0 y03;
        C0785g0 c0785g0;
        Z z13;
        X x8;
        C0817r0 c0817r0;
        C0785g0 c0785g02;
        Z z14;
        boolean zF;
        SharedPreferences sharedPreferences;
        boolean zD0;
        String str3;
        X x9;
        Bundle bundle3;
        int i8;
        int i9;
        String strG;
        int identifier;
        String string2;
        switch (this.f2955q) {
            case u0.f15495q /* 0 */:
                R0 r02 = (R0) this.f2957s;
                try {
                    s7.d.t((c) this.f2956r);
                    Y0 y04 = (Y0) r02.f11693s;
                    y04.E();
                    r02.d0();
                    y04.f11859y = false;
                    y04.f11860z = 1;
                    Z z15 = ((C0817r0) y04.f5146q).f12150y;
                    C0817r0.k(z15);
                    z15.f11871C.c(((E1) r02.f11692r).f11453q, "Successfully registered trigger URI");
                    y04.S();
                    return;
                } catch (ExecutionException e8) {
                    r02.W(e8.getCause());
                    return;
                } catch (Throwable th) {
                    r02.W(th);
                    return;
                }
            case 1:
                C1.A((C0139x) this.f2956r).i(C1.j((Throwable) this.f2957s));
                return;
            case 2:
                E.b bVar = (E.b) ((K4.c) this.f2956r).f3604r;
                if (bVar != null) {
                    bVar.i((Typeface) this.f2957s);
                    return;
                }
                return;
            case 3:
                ((J.g) this.f2956r).a(this.f2957s);
                return;
            case 4:
                RunnableC0204e runnableC0204e = (RunnableC0204e) this.f2957s;
                C0205f c0205f = runnableC0204e.f4528u;
                if (c0205f.f4536g == runnableC0204e.f4526s) {
                    List list = runnableC0204e.f4525r;
                    c0205f.f4534e = list;
                    c0205f.f4535f = Collections.unmodifiableList(list);
                    ((r) this.f2956r).a(c0205f.f4530a);
                    c0205f.a(runnableC0204e.f4527t);
                    return;
                }
                return;
            case 5:
                y yVar = (y) this.f2957s;
                O2.i iVar = (O2.i) ((O2.d) yVar.f1639v).f5115z.get((O2.a) yVar.f1636s);
                if (iVar == null) {
                    return;
                }
                M2.b bVar2 = (M2.b) this.f2956r;
                if (!(bVar2.f4155r == 0)) {
                    iVar.o(bVar2, null);
                    return;
                }
                yVar.f1634q = true;
                N2.a aVar = (N2.a) yVar.f1635r;
                if (aVar.l()) {
                    if (!yVar.f1634q || (interfaceC0251h = (InterfaceC0251h) yVar.f1637t) == null) {
                        return;
                    }
                    aVar.a(interfaceC0251h, (Set) yVar.f1638u);
                    return;
                }
                try {
                    aVar.a(null, aVar.g());
                    return;
                } catch (SecurityException e9) {
                    Log.e("GoogleApiManager", "Failed to get service from broker. ", e9);
                    aVar.k("Failed to get service from broker.");
                    iVar.o(new M2.b(10), null);
                    return;
                }
            case Z.g.STRING_SET_FIELD_NUMBER /* 6 */:
                ((C0369i) this.f2957s).E((W) this.f2956r);
                return;
            case Z.g.DOUBLE_FIELD_NUMBER /* 7 */:
                B0 b02 = (B0) this.f2956r;
                b02.b();
                if (C0253j.s()) {
                    b02.c().O(this);
                    return;
                }
                AbstractC0808o abstractC0808o = (AbstractC0808o) this.f2957s;
                boolean z16 = abstractC0808o.f12079c != 0;
                abstractC0808o.f12079c = 0L;
                if (z16) {
                    abstractC0808o.b();
                    return;
                }
                return;
            case Z.g.BYTES_FIELD_NUMBER /* 8 */:
                ServiceConnectionC0788h0 serviceConnectionC0788h0 = (ServiceConnectionC0788h0) this.f2957s;
                C0817r0 c0817r02 = serviceConnectionC0788h0.f11997r.f12005r;
                C0815q0 c0815q0 = c0817r02.f12151z;
                C0817r0.k(c0815q0);
                c0815q0.E();
                Bundle bundle4 = new Bundle();
                bundle4.putString("package_name", serviceConnectionC0788h0.f11996q);
                try {
                    C0730z c0730z = (C0730z) ((B) this.f2956r);
                    Parcel parcelD = c0730z.d();
                    AbstractC0725y.c(parcelD, bundle4);
                    Parcel parcelE = c0730z.e(parcelD, 1);
                    Bundle bundle5 = (Bundle) AbstractC0725y.a(parcelE, Bundle.CREATOR);
                    parcelE.recycle();
                    if (bundle5 == null) {
                        Z z17 = c0817r02.f12150y;
                        C0817r0.k(z17);
                        z17.f11875v.b("Install Referrer Service returned a null response");
                    }
                    break;
                } catch (Exception e10) {
                    Z z18 = c0817r02.f12150y;
                    C0817r0.k(z18);
                    z18.f11875v.c(e10.getMessage(), "Exception occurred while retrieving the Install Referrer");
                }
                C0815q0 c0815q02 = c0817r02.f12151z;
                C0817r0.k(c0815q02);
                c0815q02.E();
                throw new IllegalStateException("Unexpected call on client side");
            case 9:
                C0817r0 c0817r03 = (C0817r0) this.f2957s;
                C0815q0 c0815q03 = c0817r03.f12151z;
                C0817r0.k(c0815q03);
                c0815q03.E();
                C0784g c0784g3 = c0817r03.f12148w;
                ((C0817r0) c0784g3.f5146q).getClass();
                C0814q c0814q = new C0814q(c0817r03);
                c0814q.H();
                c0817r03.f12130L = c0814q;
                I0 i02 = (I0) this.f2956r;
                U u8 = i02.f11607g;
                P p3 = new P(c0817r03, i02.f11606f, u8 == null ? 0L : u8.f9685q);
                p3.G();
                c0817r03.f12131M = p3;
                S s8 = new S(c0817r03);
                s8.G();
                c0817r03.f12128J = s8;
                C0824t1 c0824t1 = new C0824t1(c0817r03);
                c0824t1.G();
                c0817r03.f12129K = c0824t1;
                W1 w14 = c0817r03.f12122B;
                if (w14.f11423r) {
                    throw new IllegalStateException("Can't initialize twice");
                }
                w14.E();
                SecureRandom secureRandom = new SecureRandom();
                long jNextLong = secureRandom.nextLong();
                if (jNextLong == 0) {
                    jNextLong = secureRandom.nextLong();
                    if (jNextLong == 0) {
                        Z z19 = ((C0817r0) w14.f5146q).f12150y;
                        C0817r0.k(z19);
                        z19.f11878y.b("Utils falling back to Random for random id");
                    }
                }
                w14.f11800t.set(jNextLong);
                C0817r0 c0817r04 = (C0817r0) w14.f5146q;
                c0817r04.f12140V.incrementAndGet();
                w14.f11423r = true;
                C0785g0 c0785g03 = c0817r03.f12149x;
                if (c0785g03.f11423r) {
                    throw new IllegalStateException("Can't initialize twice");
                }
                SharedPreferences sharedPreferences2 = ((C0817r0) c0785g03.f5146q).f12142q.getSharedPreferences("com.google.android.gms.measurement.prefs", 0);
                c0785g03.f11971s = sharedPreferences2;
                boolean z20 = sharedPreferences2.getBoolean("has_been_opened", false);
                c0785g03.f11963I = z20;
                if (!z20) {
                    SharedPreferences.Editor editorEdit = c0785g03.f11971s.edit();
                    editorEdit.putBoolean("has_been_opened", true);
                    editorEdit.apply();
                }
                c0785g03.f11974v = new C0782f0(c0785g03, Math.max(0L, ((Long) I.f11542d.a(null)).longValue()));
                ((C0817r0) c0785g03.f5146q).f12140V.incrementAndGet();
                c0785g03.f11423r = true;
                P p4 = c0817r03.f12131M;
                if (p4.f11456r) {
                    throw new IllegalStateException("Can't initialize twice");
                }
                C0817r0 c0817r05 = (C0817r0) p4.f5146q;
                Z z21 = c0817r05.f12150y;
                C0817r0.k(z21);
                z21.D.d("sdkVersion bundled with app, dynamiteVersion", Long.valueOf(p4.f11646z), Long.valueOf(p4.f11645y));
                Context context = c0817r05.f12142q;
                String packageName = context.getPackageName();
                PackageManager packageManager2 = context.getPackageManager();
                Z z22 = c0817r05.f12150y;
                String str4 = "Unknown";
                String str5 = "";
                String installerPackageName = "unknown";
                if (packageManager2 == null) {
                    C0817r0.k(z22);
                    c0784g = c0784g3;
                    z22.f11875v.c(Z.M(packageName), "PackageManager is null, app identity information might be inaccurate. appId");
                } else {
                    c0784g = c0784g3;
                    try {
                        installerPackageName = packageManager2.getInstallerPackageName(packageName);
                    } catch (IllegalArgumentException unused) {
                        C0817r0.k(z22);
                        z22.f11875v.c(Z.M(packageName), "Error retrieving app installer package name. appId");
                    }
                    String str6 = installerPackageName;
                    if (str6 == null) {
                        str6 = "manual_install";
                    } else {
                        if ("com.android.vending".equals(str6)) {
                            installerPackageName = "";
                        }
                        packageInfo = packageManager2.getPackageInfo(context.getPackageName(), 0);
                        if (packageInfo == null) {
                            CharSequence applicationLabel = packageManager2.getApplicationLabel(packageInfo.applicationInfo);
                            string = !TextUtils.isEmpty(applicationLabel) ? applicationLabel.toString() : str4;
                            try {
                                str = packageInfo.versionName;
                                try {
                                    i = packageInfo.versionCode;
                                    packageManager = packageManager2;
                                } catch (PackageManager.NameNotFoundException unused2) {
                                    str4 = str;
                                    C0817r0.k(z22);
                                    packageManager = packageManager2;
                                    z22.f11875v.d("Error retrieving package info. appId, appName", Z.M(packageName), string);
                                    i = Integer.MIN_VALUE;
                                    str = str4;
                                }
                            } catch (PackageManager.NameNotFoundException unused3) {
                            }
                        }
                        String str7 = installerPackageName;
                        p4.f11639s = packageName;
                        p4.f11642v = str7;
                        p4.f11640t = str;
                        p4.f11641u = i;
                        p4.f11643w = string;
                        p4.f11644x = 0L;
                        h8 = I.f11580q1;
                        c0784g2 = c0817r05.f12148w;
                        if (c0784g2.R(null, h8) || TextUtils.isEmpty(c0817r05.s())) {
                            z8 = false;
                        } else if ("am".equals(c0784g2.R(null, h8) ? null : c0817r05.f12144s)) {
                            z8 = true;
                        }
                        iL = c0817r05.l();
                        strB = c0817r05.f12127I;
                        if (iL != 0) {
                            z9 = z8;
                            if (iL == 1) {
                                i5 = iL;
                                C0817r0.k(z22);
                                z22.f11870B.b("App measurement deactivated via the manifest");
                            } else if (iL == 3) {
                                i5 = iL;
                                C0817r0.k(z22);
                                z22.f11870B.b("App measurement disabled by setAnalyticsCollectionEnabled(false)");
                            } else if (iL == 4) {
                                i5 = iL;
                                C0817r0.k(z22);
                                z22.f11870B.b("App measurement disabled via the manifest");
                            } else if (iL == 6) {
                                i5 = iL;
                                C0817r0.k(z22);
                                z22.f11869A.b("App measurement deactivated via resources. This method is being deprecated. Please refer to https://firebase.google.com/support/guides/disable-analytics");
                            } else if (iL == 7) {
                                i5 = iL;
                                C0817r0.k(z22);
                                z22.f11870B.b("App measurement disabled via the global data collection setting");
                            } else if (iL != 8) {
                                C0817r0.k(z22);
                                i5 = iL;
                                z22.f11870B.b("App measurement disabled");
                                C0817r0.k(z22);
                                z22.f11876w.b("Invalid scion state in identity");
                            } else {
                                i5 = iL;
                                C0817r0.k(z22);
                                z22.f11870B.b("App measurement disabled due to denied storage consent");
                            }
                        } else {
                            z9 = z8;
                            i5 = iL;
                            C0817r0.k(z22);
                            z22.D.b("App measurement collection enabled");
                        }
                        p4.D = "";
                        p4.f11636E = "";
                        if (z9) {
                            p4.f11636E = c0817r05.s();
                        }
                        strG = G0.g(context, strB);
                        if (!TextUtils.isEmpty(strG)) {
                            str5 = strG;
                        }
                        p4.D = str5;
                        if (!c0784g2.R(null, h8) && !TextUtils.isEmpty(strG)) {
                            Resources resources = context.getResources();
                            if (!TextUtils.isEmpty(strB)) {
                                strB = G0.b(context);
                            }
                            identifier = resources.getIdentifier("admob_app_id", "string", strB);
                            if (identifier != 0) {
                                string2 = null;
                                p4.f11636E = string2;
                            } else {
                                try {
                                    string2 = resources.getString(identifier);
                                } catch (Resources.NotFoundException unused4) {
                                    string2 = null;
                                }
                                p4.f11636E = string2;
                            }
                            p4.f11633A = null;
                            c0784g2.getClass();
                            w.c("analytics.safelisted_events");
                            bundleN = c0784g2.N();
                            C0817r0 c0817r06 = (C0817r0) c0784g2.f5146q;
                            if (bundleN != null) {
                                if (bundleN.containsKey("analytics.safelisted_events")) {
                                    numValueOf = Integer.valueOf(bundleN.getInt("analytics.safelisted_events"));
                                }
                                if (numValueOf == null) {
                                    try {
                                        stringArray = c0817r06.f12142q.getResources().getStringArray(numValueOf.intValue());
                                    } catch (Resources.NotFoundException e11) {
                                        Z z23 = c0817r06.f12150y;
                                        C0817r0.k(z23);
                                        z23.f11875v.c(e11, "Failed to load string array from metadata: resource not found");
                                    }
                                    listAsList = stringArray != null ? Arrays.asList(stringArray) : null;
                                    break;
                                }
                                if (listAsList == null) {
                                    p4.f11633A = listAsList;
                                } else if (listAsList.isEmpty()) {
                                    C0817r0.k(z22);
                                    z22.f11869A.b("Safelisted event list is empty. Ignoring");
                                } else {
                                    for (String str8 : listAsList) {
                                        W1 w15 = c0817r05.f12122B;
                                        C0817r0.i(w15);
                                        if (!w15.r0("safelisted event", str8)) {
                                        }
                                    }
                                    p4.f11633A = listAsList;
                                }
                                if (packageManager == null) {
                                    p4.f11635C = U2.a.F(context) ? 1 : 0;
                                } else {
                                    p4.f11635C = 0;
                                }
                                ((C0817r0) p4.f5146q).f12140V.incrementAndGet();
                                p4.f11456r = true;
                                c0777d1 = new C0777d1(c0817r03);
                                c0777d1.G();
                                c0817r03.f12132N = c0777d1;
                                if (!c0777d1.f11456r) {
                                    throw new IllegalStateException("Can't initialize twice");
                                }
                                c0777d1.f11916s = (JobScheduler) ((C0817r0) c0777d1.f5146q).f12142q.getSystemService("jobscheduler");
                                ((C0817r0) c0777d1.f5146q).f12140V.incrementAndGet();
                                c0777d1.f11456r = true;
                                Z z24 = c0817r03.f12150y;
                                C0817r0.k(z24);
                                c0784g.L();
                                X x10 = z24.f11870B;
                                x10.c(119002L, "App measurement initialized, version");
                                C0817r0.k(z24);
                                x10.b("To enable debug logging run: adb shell setprop log.tag.FA VERBOSE");
                                String strK = p3.K();
                                C0784g c0784g4 = c0784g;
                                if (TextUtils.isEmpty(c0817r03.f12143r)) {
                                    if (w14.u0(strK, c0784g4.f11953s)) {
                                        C0817r0.k(z24);
                                        x10.b("Faster debug mode event logging enabled. To disable, run:\n  adb shell setprop debug.firebase.analytics.app .none.");
                                    } else {
                                        C0817r0.k(z24);
                                        x10.b("To enable faster debug mode event logging run:\n  adb shell setprop debug.firebase.analytics.app ".concat(String.valueOf(strK)));
                                    }
                                }
                                C0817r0.k(z24);
                                X x11 = z24.f11871C;
                                x11.b("Debug-level message logging enabled");
                                int i10 = c0817r03.f12138T;
                                AtomicInteger atomicInteger = c0817r03.f12140V;
                                int i11 = atomicInteger.get();
                                X x12 = z24.f11875v;
                                if (i10 != i11) {
                                    C0817r0.k(z24);
                                    x12.d("Not all components initialized", Integer.valueOf(c0817r03.f12138T), Integer.valueOf(atomicInteger.get()));
                                }
                                c0817r03.f12133O = true;
                                C0815q0 c0815q04 = c0817r03.f12151z;
                                C0817r0.k(c0815q04);
                                c0815q04.E();
                                H h9 = I.f11521S0;
                                if (c0784g4.R(null, h9)) {
                                    C0817r0.h(c0817r03.f12132N);
                                    z10 = c0817r03.f12132N.I() == 2;
                                }
                                J3.b();
                                if (c0784g4.R(null, I.f11529X0)) {
                                    w14.E();
                                    if (w14.N0() == 1) {
                                        w14.E();
                                        IntentFilter intentFilter = new IntentFilter();
                                        j8 = 1;
                                        intentFilter.addAction("com.google.android.gms.measurement.TRIGGERS_AVAILABLE");
                                        if (c0817r04.f12148w.R(null, h9)) {
                                            intentFilter.addAction("com.google.android.gms.measurement.BATCHES_AVAILABLE");
                                        }
                                        C0070g c0070g = new C0070g(c0817r04);
                                        i9 = Build.VERSION.SDK_INT;
                                        Context context2 = c0817r04.f12142q;
                                        if (i9 < 33) {
                                            h.f(context2, c0070g, intentFilter);
                                        } else if (i9 >= 26) {
                                            h.e(context2, c0070g, intentFilter);
                                        } else {
                                            context2.registerReceiver(c0070g, intentFilter, null, null);
                                        }
                                        Z z25 = c0817r04.f12150y;
                                        C0817r0.k(z25);
                                        z25.f11871C.b("Registered app receiver");
                                        if (z10) {
                                            C0817r0.h(c0817r03.f12132N);
                                            c0817r03.f12132N.J(((Long) I.f11491C.a(null)).longValue());
                                        }
                                    } else if (z10) {
                                        z10 = true;
                                        w14.E();
                                        IntentFilter intentFilter2 = new IntentFilter();
                                        j8 = 1;
                                        intentFilter2.addAction("com.google.android.gms.measurement.TRIGGERS_AVAILABLE");
                                        if (c0817r04.f12148w.R(null, h9)) {
                                        }
                                        C0070g c0070g2 = new C0070g(c0817r04);
                                        i9 = Build.VERSION.SDK_INT;
                                        Context context22 = c0817r04.f12142q;
                                        if (i9 < 33) {
                                        }
                                        Z z252 = c0817r04.f12150y;
                                        C0817r0.k(z252);
                                        z252.f11871C.b("Registered app receiver");
                                        if (z10) {
                                        }
                                    } else {
                                        j8 = 1;
                                    }
                                }
                                F0 f0L = c0785g03.L();
                                C0 c0O3 = c0784g4.O("google_analytics_default_allow_ad_storage", false);
                                C0 c0O4 = c0784g4.O("google_analytics_default_allow_analytics_storage", false);
                                C0 c02 = C0.f11431r;
                                E0 e02 = E0.f11448s;
                                U u9 = i02.f11607g;
                                Y0 y05 = c0817r03.f12125F;
                                if (c0O3 != c02 || c0O4 != c02) {
                                    w12 = w14;
                                    if (F0.l(-10, c0785g03.J().getInt("consent_source", 100))) {
                                        EnumMap enumMap = new EnumMap(E0.class);
                                        enumMap.put(E0.f11447r, c0O3);
                                        enumMap.put(e02, c0O4);
                                        f02 = new F0(enumMap, -10);
                                        z11 = false;
                                    }
                                    if (f02 != null) {
                                        C0817r0.j(y05);
                                        y05.X(f02, true);
                                        f0L = f02;
                                    }
                                    C0817r0.j(y05);
                                    y05.W(f0L);
                                    c0785g03.E();
                                    int i12 = C0811p.b(c0785g03.J().getString("dma_consent_settings", null)).f12090a;
                                    c0O = c0784g4.O("google_analytics_default_allow_ad_personalization_signals", true);
                                    X x13 = z24.D;
                                    if (c0O != c02) {
                                        C0817r0.k(z24);
                                        x13.c(c0O, "Default ad personalization consent from Manifest");
                                    }
                                    c0O2 = c0784g4.O("google_analytics_default_allow_ad_user_data", true);
                                    C0817r0 c0817r07 = (C0817r0) y05.f5146q;
                                    if (c0O2 != c02 && F0.l(-10, i12)) {
                                        C0817r0.j(y05);
                                        EnumMap enumMap2 = new EnumMap(E0.class);
                                        enumMap2.put(E0.f11449t, c0O2);
                                        y05.V(new C0811p(enumMap2, -10, (Boolean) null, (String) null), true);
                                    } else {
                                        if (!TextUtils.isEmpty(c0817r03.n().L()) || (i12 != 0 && i12 != 30)) {
                                            if (TextUtils.isEmpty(c0817r03.n().L()) && u9 != null && (bundle2 = u9.f9691w) != null && F0.l(30, i12)) {
                                                C0811p c0811pA = C0811p.a(30, bundle2);
                                                it = c0811pA.f12094e.values().iterator();
                                                while (true) {
                                                    if (it.hasNext()) {
                                                        if (((C0) it.next()) != c02) {
                                                            C0817r0.j(y05);
                                                            y05.V(c0811pA, true);
                                                        }
                                                    }
                                                }
                                            }
                                            if (TextUtils.isEmpty(c0817r03.n().L()) && u9 != null && (bundle = u9.f9691w) != null && c0785g03.D.f() == null && (boolD = C0811p.d(bundle)) != null) {
                                                C0817r0.j(y05);
                                                String string3 = boolD.toString();
                                                c0817r07.D.getClass();
                                                z12 = z11;
                                                y05.Y(u9.f9689u, "allow_personalized_ads", string3, z12, System.currentTimeMillis());
                                                y02 = y05;
                                            }
                                            boolP = c0784g4.P("google_analytics_tcf_data_enabled");
                                            if (boolP != null || boolP.booleanValue()) {
                                                C0817r0.k(z24);
                                                x11.b("TCF client enabled.");
                                                C0817r0.j(y02);
                                                y02.E();
                                                Z z26 = c0817r07.f12150y;
                                                C0817r0.k(z26);
                                                z26.f11871C.b("Register tcfPrefChangeListener.");
                                                if (y02.f11850K == null) {
                                                    y02.f11851L = new P0(y02, c0817r07, 2);
                                                    y02.f11850K = new SharedPreferences.OnSharedPreferenceChangeListener() { // from class: d3.O0
                                                        @Override // android.content.SharedPreferences.OnSharedPreferenceChangeListener
                                                        public final void onSharedPreferenceChanged(SharedPreferences sharedPreferences3, String str9) {
                                                            Y0 y06 = y02;
                                                            C0817r0 c0817r08 = (C0817r0) y06.f5146q;
                                                            boolean zR = c0817r08.f12148w.R(null, I.f11564k1);
                                                            Z z27 = c0817r08.f12150y;
                                                            if (!zR) {
                                                                if (Objects.equals(str9, "IABTCF_TCString")) {
                                                                    C0817r0.k(z27);
                                                                    z27.D.b("IABTCF_TCString change picked up in listener.");
                                                                    P0 p02 = y06.f11851L;
                                                                    P2.w.f(p02);
                                                                    p02.c(500L);
                                                                    return;
                                                                }
                                                                return;
                                                            }
                                                            if (Objects.equals(str9, "IABTCF_TCString") || Objects.equals(str9, "IABTCF_gdprApplies") || Objects.equals(str9, "IABTCF_EnableAdvertiserConsentMode")) {
                                                                C0817r0.k(z27);
                                                                z27.D.b("IABTCF_TCString change picked up in listener.");
                                                                P0 p03 = y06.f11851L;
                                                                P2.w.f(p03);
                                                                p03.c(500L);
                                                            }
                                                        }
                                                    };
                                                }
                                                C0785g0 c0785g04 = c0817r07.f12149x;
                                                C0817r0.i(c0785g04);
                                                c0785g04.I().registerOnSharedPreferenceChangeListener(y02.f11850K);
                                                C0817r0.j(y02);
                                                y02.N();
                                            }
                                            s0 s0Var = c0785g03.f11975w;
                                            jG = s0Var.g();
                                            long j9 = c0817r03.f12141W;
                                            if (jG == 0) {
                                                C0817r0.k(z24);
                                                x13.c(Long.valueOf(j9), "Persisting first open");
                                                s0Var.h(j9);
                                            }
                                            C0817r0.j(y02);
                                            c0791i0 = y02.H;
                                            if (c0791i0.d() && c0791i0.e()) {
                                                C0785g0 c0785g05 = c0791i0.f12005r.f12149x;
                                                C0817r0.i(c0785g05);
                                                c0785g05.f11968N.g(null);
                                            }
                                            if (c0817r03.g()) {
                                                if (c0817r03.f()) {
                                                    w13 = w12;
                                                    if (w13.t0("android.permission.INTERNET")) {
                                                        x9 = x12;
                                                    } else {
                                                        C0817r0.k(z24);
                                                        x9 = x12;
                                                        x9.b("App is missing INTERNET permission");
                                                    }
                                                    if (!w13.t0("android.permission.ACCESS_NETWORK_STATE")) {
                                                        C0817r0.k(z24);
                                                        x9.b("App is missing ACCESS_NETWORK_STATE permission");
                                                    }
                                                    Context context3 = c0817r03.f12142q;
                                                    if (!U2.b.a(context3).d() && !c0784g4.H()) {
                                                        if (!W1.A0(context3)) {
                                                            C0817r0.k(z24);
                                                            x9.b("AppMeasurementReceiver not registered/enabled");
                                                        }
                                                        if (!W1.C0(context3)) {
                                                            C0817r0.k(z24);
                                                            x9.b("AppMeasurementService not registered/enabled");
                                                        }
                                                    }
                                                    C0817r0.k(z24);
                                                    x9.b("Uploading is not possible. App measurement disabled");
                                                } else {
                                                    w13 = w12;
                                                }
                                                z14 = z24;
                                                c0817r0 = c0817r07;
                                                x8 = x13;
                                                c0785g02 = c0785g03;
                                            } else {
                                                w13 = w12;
                                                boolean zIsEmpty = TextUtils.isEmpty(c0817r03.n().L());
                                                C0016c c0016c = c0785g03.f11976x;
                                                if (zIsEmpty) {
                                                    str2 = null;
                                                    if (c0784g4.R(null, I.f11580q1) || TextUtils.isEmpty(c0817r03.n().J())) {
                                                        z13 = z24;
                                                        y03 = y02;
                                                        c0817r0 = c0817r07;
                                                        x8 = x13;
                                                        c0785g0 = c0785g03;
                                                    }
                                                    if (!c0785g0.L().k(e02)) {
                                                        c0016c.g(null);
                                                    }
                                                    C0817r0.j(y03);
                                                    y02 = y03;
                                                    y02.f11857w.set(c0016c.f());
                                                    c0817r04.f12142q.getClassLoader().loadClass("com.google.firebase.remoteconfig.FirebaseRemoteConfig");
                                                    z14 = z13;
                                                    c0785g02 = c0785g0;
                                                    String str9 = null;
                                                    if (!TextUtils.isEmpty(c0817r03.n().L()) || (!c0784g4.R(str9, I.f11580q1) && !TextUtils.isEmpty(c0817r03.n().J()))) {
                                                        zF = c0817r03.f();
                                                        sharedPreferences = c0785g02.f11971s;
                                                        if (!(sharedPreferences != null ? z12 : sharedPreferences.contains("deferred_analytics_collection")) && !c0784g4.F()) {
                                                            c0785g02.M(!zF);
                                                        }
                                                        if (zF) {
                                                            C0817r0.j(y02);
                                                            y02.J();
                                                        }
                                                        A1 a1 = c0817r03.f12121A;
                                                        C0817r0.j(a1);
                                                        a1.f11426u.w();
                                                        c0817r03.r().K(new AtomicReference());
                                                        c0817r03.r().N(c0785g02.f11970P.N());
                                                    }
                                                } else {
                                                    str2 = null;
                                                }
                                                H h10 = I.f11580q1;
                                                if (c0784g4.R(str2, h10)) {
                                                    c0817r0 = c0817r07;
                                                    String strL = c0817r03.n().L();
                                                    c0785g03.E();
                                                    x8 = x13;
                                                    z13 = z24;
                                                    String string4 = c0785g03.J().getString("gmp_app_id", null);
                                                    boolean zIsEmpty2 = TextUtils.isEmpty(strL);
                                                    boolean zIsEmpty3 = TextUtils.isEmpty(string4);
                                                    if (zIsEmpty2 || zIsEmpty3) {
                                                        zD0 = false;
                                                        y03 = y02;
                                                        c0785g0 = c0785g03;
                                                    } else {
                                                        w.f(strL);
                                                        if (!strL.equals(string4)) {
                                                            zD0 = true;
                                                        }
                                                        y03 = y02;
                                                        c0785g0 = c0785g03;
                                                    }
                                                } else {
                                                    z13 = z24;
                                                    c0817r0 = c0817r07;
                                                    x8 = x13;
                                                    String strL2 = c0817r03.n().L();
                                                    c0785g03.E();
                                                    String string5 = c0785g03.J().getString("gmp_app_id", null);
                                                    String strJ = c0817r03.n().J();
                                                    c0785g03.E();
                                                    c0785g0 = c0785g03;
                                                    y03 = y02;
                                                    zD0 = w13.D0(strL2, string5, strJ, c0785g0.J().getString("admob_app_id", null));
                                                }
                                                if (zD0) {
                                                    C0817r0.k(z13);
                                                    x10.b("Rechecking which service to use due to a GMP App Id change");
                                                    c0785g0.E();
                                                    c0785g0.E();
                                                    Boolean boolValueOf = c0785g0.J().contains("measurement_enabled") ? Boolean.valueOf(c0785g0.J().getBoolean("measurement_enabled", true)) : null;
                                                    SharedPreferences.Editor editorEdit2 = c0785g0.J().edit();
                                                    editorEdit2.clear();
                                                    editorEdit2.apply();
                                                    if (boolValueOf != null) {
                                                        c0785g0.E();
                                                        SharedPreferences.Editor editorEdit3 = c0785g0.J().edit();
                                                        editorEdit3.putBoolean("measurement_enabled", boolValueOf.booleanValue());
                                                        editorEdit3.apply();
                                                    }
                                                    c0817r03.o().J();
                                                    c0817r03.f12129K.J();
                                                    c0817r03.f12129K.I();
                                                    s0Var.h(j9);
                                                    str3 = null;
                                                    c0016c.g(null);
                                                } else {
                                                    str3 = null;
                                                }
                                                String strL3 = c0817r03.n().L();
                                                c0785g0.E();
                                                SharedPreferences.Editor editorEdit4 = c0785g0.J().edit();
                                                editorEdit4.putString("gmp_app_id", strL3);
                                                editorEdit4.apply();
                                                if (c0784g4.R(str3, h10)) {
                                                    c0785g0.E();
                                                    SharedPreferences.Editor editorEdit5 = c0785g0.J().edit();
                                                    editorEdit5.putString("admob_app_id", str3);
                                                    editorEdit5.apply();
                                                } else {
                                                    String strJ2 = c0817r03.n().J();
                                                    c0785g0.E();
                                                    SharedPreferences.Editor editorEdit6 = c0785g0.J().edit();
                                                    editorEdit6.putString("admob_app_id", strJ2);
                                                    editorEdit6.apply();
                                                }
                                                if (!c0785g0.L().k(e02)) {
                                                }
                                                C0817r0.j(y03);
                                                y02 = y03;
                                                y02.f11857w.set(c0016c.f());
                                                c0817r04.f12142q.getClassLoader().loadClass("com.google.firebase.remoteconfig.FirebaseRemoteConfig");
                                                z14 = z13;
                                                c0785g02 = c0785g0;
                                                String str92 = null;
                                                if (!TextUtils.isEmpty(c0817r03.n().L())) {
                                                    zF = c0817r03.f();
                                                    sharedPreferences = c0785g02.f11971s;
                                                    if (!(sharedPreferences != null ? z12 : sharedPreferences.contains("deferred_analytics_collection"))) {
                                                        c0785g02.M(!zF);
                                                    }
                                                    if (zF) {
                                                    }
                                                    A1 a12 = c0817r03.f12121A;
                                                    C0817r0.j(a12);
                                                    a12.f11426u.w();
                                                    c0817r03.r().K(new AtomicReference());
                                                    c0817r03.r().N(c0785g02.f11970P.N());
                                                }
                                            }
                                            J3.b();
                                            if (c0784g4.R(null, I.f11529X0)) {
                                                w13.E();
                                                if (w13.N0() == j8) {
                                                    long jIntValue = (((long) ((Integer) I.f11596x0.a(null)).intValue()) * 1000) + ((long) new Random().nextInt(5000));
                                                    c0817r03.D.getClass();
                                                    long jMax = Math.max(500L, jIntValue - SystemClock.elapsedRealtime());
                                                    if (jMax > 500) {
                                                        C0817r0.k(z14);
                                                        x8.c(Long.valueOf(jMax), "Waiting to fetch trigger URIs until some time after boot. Delay in millis");
                                                    }
                                                    C0817r0.j(y02);
                                                    y02.E();
                                                    if (y02.f11843B == null) {
                                                        y02.f11843B = new P0(y02, c0817r0, 0);
                                                    }
                                                    y02.f11843B.c(jMax);
                                                }
                                            }
                                            c0785g02.f11961F.a(true);
                                            return;
                                        }
                                        C0817r0.j(y05);
                                        y05.V(new C0811p((Boolean) null, -10, (Boolean) null, (String) null), true);
                                    }
                                    y02 = y05;
                                    z12 = z11;
                                    boolP = c0784g4.P("google_analytics_tcf_data_enabled");
                                    if (boolP != null) {
                                        C0817r0.k(z24);
                                        x11.b("TCF client enabled.");
                                        C0817r0.j(y02);
                                        y02.E();
                                        Z z262 = c0817r07.f12150y;
                                        C0817r0.k(z262);
                                        z262.f11871C.b("Register tcfPrefChangeListener.");
                                        if (y02.f11850K == null) {
                                        }
                                        C0785g0 c0785g042 = c0817r07.f12149x;
                                        C0817r0.i(c0785g042);
                                        c0785g042.I().registerOnSharedPreferenceChangeListener(y02.f11850K);
                                        C0817r0.j(y02);
                                        y02.N();
                                    }
                                    s0 s0Var2 = c0785g03.f11975w;
                                    jG = s0Var2.g();
                                    long j92 = c0817r03.f12141W;
                                    if (jG == 0) {
                                    }
                                    C0817r0.j(y02);
                                    c0791i0 = y02.H;
                                    if (c0791i0.d()) {
                                        C0785g0 c0785g052 = c0791i0.f12005r.f12149x;
                                        C0817r0.i(c0785g052);
                                        c0785g052.f11968N.g(null);
                                    }
                                    if (c0817r03.g()) {
                                    }
                                    J3.b();
                                    if (c0784g4.R(null, I.f11529X0)) {
                                    }
                                    c0785g02.f11961F.a(true);
                                    return;
                                }
                                w12 = w14;
                                if (TextUtils.isEmpty(c0817r03.n().L()) || !((i8 = f0L.f11459b) == 0 || i8 == 30 || i8 == 10 || i8 == 30 || i8 == 30 || i8 == 40)) {
                                    z11 = false;
                                    if (!c0784g4.R(null, I.f11580q1) && TextUtils.isEmpty(c0817r03.n().L()) && u9 != null && (bundle3 = u9.f9691w) != null && F0.l(30, c0785g03.J().getInt("consent_source", 100))) {
                                        f02 = F0.d(30, bundle3);
                                        Iterator it2 = f02.f11458a.values().iterator();
                                        while (it2.hasNext()) {
                                            if (((C0) it2.next()) != c02) {
                                            }
                                        }
                                    }
                                    if (f02 != null) {
                                    }
                                    C0817r0.j(y05);
                                    y05.W(f0L);
                                    c0785g03.E();
                                    int i122 = C0811p.b(c0785g03.J().getString("dma_consent_settings", null)).f12090a;
                                    c0O = c0784g4.O("google_analytics_default_allow_ad_personalization_signals", true);
                                    X x132 = z24.D;
                                    if (c0O != c02) {
                                    }
                                    c0O2 = c0784g4.O("google_analytics_default_allow_ad_user_data", true);
                                    C0817r0 c0817r072 = (C0817r0) y05.f5146q;
                                    if (c0O2 != c02) {
                                        if (!TextUtils.isEmpty(c0817r03.n().L())) {
                                            if (TextUtils.isEmpty(c0817r03.n().L())) {
                                                C0811p c0811pA2 = C0811p.a(30, bundle2);
                                                it = c0811pA2.f12094e.values().iterator();
                                                while (true) {
                                                    if (it.hasNext()) {
                                                    }
                                                }
                                            }
                                            if (TextUtils.isEmpty(c0817r03.n().L())) {
                                                y02 = y05;
                                                z12 = z11;
                                            } else {
                                                y02 = y05;
                                                z12 = z11;
                                            }
                                        }
                                    }
                                    boolP = c0784g4.P("google_analytics_tcf_data_enabled");
                                    if (boolP != null) {
                                    }
                                    s0 s0Var22 = c0785g03.f11975w;
                                    jG = s0Var22.g();
                                    long j922 = c0817r03.f12141W;
                                    if (jG == 0) {
                                    }
                                    C0817r0.j(y02);
                                    c0791i0 = y02.H;
                                    if (c0791i0.d()) {
                                    }
                                    if (c0817r03.g()) {
                                    }
                                    J3.b();
                                    if (c0784g4.R(null, I.f11529X0)) {
                                    }
                                    c0785g02.f11961F.a(true);
                                    return;
                                }
                                C0817r0.j(y05);
                                z11 = false;
                                y05.X(new F0(-10), false);
                                f02 = null;
                                if (f02 != null) {
                                }
                                C0817r0.j(y05);
                                y05.W(f0L);
                                c0785g03.E();
                                int i1222 = C0811p.b(c0785g03.J().getString("dma_consent_settings", null)).f12090a;
                                c0O = c0784g4.O("google_analytics_default_allow_ad_personalization_signals", true);
                                X x1322 = z24.D;
                                if (c0O != c02) {
                                }
                                c0O2 = c0784g4.O("google_analytics_default_allow_ad_user_data", true);
                                C0817r0 c0817r0722 = (C0817r0) y05.f5146q;
                                if (c0O2 != c02) {
                                }
                                boolP = c0784g4.P("google_analytics_tcf_data_enabled");
                                if (boolP != null) {
                                }
                                s0 s0Var222 = c0785g03.f11975w;
                                jG = s0Var222.g();
                                long j9222 = c0817r03.f12141W;
                                if (jG == 0) {
                                }
                                C0817r0.j(y02);
                                c0791i0 = y02.H;
                                if (c0791i0.d()) {
                                }
                                if (c0817r03.g()) {
                                }
                                J3.b();
                                if (c0784g4.R(null, I.f11529X0)) {
                                }
                                c0785g02.f11961F.a(true);
                                return;
                            }
                            Z z27 = c0817r06.f12150y;
                            C0817r0.k(z27);
                            z27.f11875v.b("Failed to load metadata: Metadata bundle is null");
                            numValueOf = null;
                            if (numValueOf == null) {
                            }
                            if (listAsList == null) {
                            }
                            if (packageManager == null) {
                            }
                            ((C0817r0) p4.f5146q).f12140V.incrementAndGet();
                            p4.f11456r = true;
                            c0777d1 = new C0777d1(c0817r03);
                            c0777d1.G();
                            c0817r03.f12132N = c0777d1;
                            if (!c0777d1.f11456r) {
                            }
                        }
                        if (i5 == 0) {
                            C0817r0.k(z22);
                            z22.D.d("App measurement enabled for app package, google app id", p4.f11639s, TextUtils.isEmpty(p4.D) ? p4.f11636E : p4.D);
                        }
                        p4.f11633A = null;
                        c0784g2.getClass();
                        w.c("analytics.safelisted_events");
                        bundleN = c0784g2.N();
                        C0817r0 c0817r062 = (C0817r0) c0784g2.f5146q;
                        if (bundleN != null) {
                        }
                        numValueOf = null;
                        if (numValueOf == null) {
                        }
                        if (listAsList == null) {
                        }
                        if (packageManager == null) {
                        }
                        ((C0817r0) p4.f5146q).f12140V.incrementAndGet();
                        p4.f11456r = true;
                        c0777d1 = new C0777d1(c0817r03);
                        c0777d1.G();
                        c0817r03.f12132N = c0777d1;
                        if (!c0777d1.f11456r) {
                        }
                    }
                    installerPackageName = str6;
                    packageInfo = packageManager2.getPackageInfo(context.getPackageName(), 0);
                    if (packageInfo == null) {
                    }
                    String str72 = installerPackageName;
                    p4.f11639s = packageName;
                    p4.f11642v = str72;
                    p4.f11640t = str;
                    p4.f11641u = i;
                    p4.f11643w = string;
                    p4.f11644x = 0L;
                    h8 = I.f11580q1;
                    c0784g2 = c0817r05.f12148w;
                    if (c0784g2.R(null, h8)) {
                        z8 = false;
                    }
                    iL = c0817r05.l();
                    strB = c0817r05.f12127I;
                    if (iL != 0) {
                    }
                    p4.D = "";
                    p4.f11636E = "";
                    if (z9) {
                    }
                    strG = G0.g(context, strB);
                    if (!TextUtils.isEmpty(strG)) {
                    }
                    p4.D = str5;
                    if (!c0784g2.R(null, h8)) {
                        Resources resources2 = context.getResources();
                        if (!TextUtils.isEmpty(strB)) {
                        }
                        identifier = resources2.getIdentifier("admob_app_id", "string", strB);
                        if (identifier != 0) {
                        }
                        p4.f11633A = null;
                        c0784g2.getClass();
                        w.c("analytics.safelisted_events");
                        bundleN = c0784g2.N();
                        C0817r0 c0817r0622 = (C0817r0) c0784g2.f5146q;
                        if (bundleN != null) {
                        }
                        numValueOf = null;
                        if (numValueOf == null) {
                        }
                        if (listAsList == null) {
                        }
                        if (packageManager == null) {
                        }
                        ((C0817r0) p4.f5146q).f12140V.incrementAndGet();
                        p4.f11456r = true;
                        c0777d1 = new C0777d1(c0817r03);
                        c0777d1.G();
                        c0817r03.f12132N = c0777d1;
                        if (!c0777d1.f11456r) {
                        }
                    }
                    if (i5 == 0) {
                    }
                    p4.f11633A = null;
                    c0784g2.getClass();
                    w.c("analytics.safelisted_events");
                    bundleN = c0784g2.N();
                    C0817r0 c0817r06222 = (C0817r0) c0784g2.f5146q;
                    if (bundleN != null) {
                    }
                    numValueOf = null;
                    if (numValueOf == null) {
                    }
                    if (listAsList == null) {
                    }
                    if (packageManager == null) {
                    }
                    ((C0817r0) p4.f5146q).f12140V.incrementAndGet();
                    p4.f11456r = true;
                    c0777d1 = new C0777d1(c0817r03);
                    c0777d1.G();
                    c0817r03.f12132N = c0777d1;
                    if (!c0777d1.f11456r) {
                    }
                }
                packageManager = packageManager2;
                i = Integer.MIN_VALUE;
                string = str4;
                str = string;
                String str722 = installerPackageName;
                p4.f11639s = packageName;
                p4.f11642v = str722;
                p4.f11640t = str;
                p4.f11641u = i;
                p4.f11643w = string;
                p4.f11644x = 0L;
                h8 = I.f11580q1;
                c0784g2 = c0817r05.f12148w;
                if (c0784g2.R(null, h8)) {
                }
                iL = c0817r05.l();
                strB = c0817r05.f12127I;
                if (iL != 0) {
                }
                p4.D = "";
                p4.f11636E = "";
                if (z9) {
                }
                strG = G0.g(context, strB);
                if (!TextUtils.isEmpty(strG)) {
                }
                p4.D = str5;
                if (!c0784g2.R(null, h8)) {
                }
                if (i5 == 0) {
                }
                p4.f11633A = null;
                c0784g2.getClass();
                w.c("analytics.safelisted_events");
                bundleN = c0784g2.N();
                C0817r0 c0817r062222 = (C0817r0) c0784g2.f5146q;
                if (bundleN != null) {
                }
                numValueOf = null;
                if (numValueOf == null) {
                }
                if (listAsList == null) {
                }
                if (packageManager == null) {
                }
                ((C0817r0) p4.f5146q).f12140V.incrementAndGet();
                p4.f11456r = true;
                c0777d1 = new C0777d1(c0817r03);
                c0777d1.G();
                c0817r03.f12132N = c0777d1;
                if (!c0777d1.f11456r) {
                }
                break;
                break;
            case 10:
                a();
                return;
            case 11:
                b();
                return;
            case 12:
                c();
                return;
            case 13:
                d();
                return;
            case 14:
                ((Y0) this.f2957s).a0((Boolean) this.f2956r, true);
                return;
            case 15:
                e();
                return;
            case 16:
                f();
                return;
            case 17:
                g();
                return;
            case 18:
                C0824t1.X(((ServiceConnectionC0821s1) this.f2957s).f12173s, (ComponentName) this.f2956r);
                return;
            case 19:
                h();
                return;
            case 20:
                i();
                return;
            case 21:
                j();
                return;
            case 22:
                k();
                return;
            case 23:
                l();
                return;
            case 24:
                m();
                return;
            case 25:
                n();
                return;
            case 26:
                o();
                return;
            case 27:
                p();
                return;
            case 28:
                q();
                return;
            default:
                m mVar = (m) this.f2957s;
                try {
                    o oVarK = ((g3.g) mVar.f12941s).k(((o) this.f2956r).g());
                    ExecutorC0401d executorC0401d = i.f12925b;
                    oVarK.c(executorC0401d, mVar);
                    oVarK.b(executorC0401d, mVar);
                    oVarK.a(executorC0401d, mVar);
                    return;
                } catch (f e12) {
                    if (e12.getCause() instanceof Exception) {
                        mVar.l((Exception) e12.getCause());
                        return;
                    } else {
                        mVar.l(e12);
                        return;
                    }
                } catch (CancellationException unused5) {
                    mVar.b();
                    return;
                } catch (Exception e13) {
                    mVar.l(e13);
                    return;
                }
        }
    }

    public String toString() {
        switch (this.f2955q) {
            case u0.f15495q /* 0 */:
                A1.y yVar = new A1.y(3, b.class.getSimpleName());
                R0 r02 = new R0(8, false);
                ((R0) yVar.f365t).f11693s = r02;
                yVar.f365t = r02;
                r02.f11692r = (R0) this.f2957s;
                return yVar.toString();
            case 22:
                Runnable runnable = (Runnable) this.f2956r;
                if (runnable != null) {
                    return "SequentialExecutorWorker{running=" + runnable + "}";
                }
                StringBuilder sb = new StringBuilder("SequentialExecutorWorker{state=");
                int i = ((l) this.f2957s).f12470s;
                sb.append(i != 1 ? i != 2 ? i != 3 ? i != 4 ? "null" : "RUNNING" : "QUEUED" : "QUEUING" : "IDLE");
                sb.append("}");
                return sb.toString();
            default:
                return super.toString();
        }
    }

    public /* synthetic */ b(Object obj, int i, Object obj2) {
        this.f2955q = i;
        this.f2956r = obj;
        this.f2957s = obj2;
    }

    public /* synthetic */ b(Object obj, Object obj2, int i, boolean z8) {
        this.f2955q = i;
        this.f2957s = obj;
        this.f2956r = obj2;
    }

    public b(l lVar) {
        this.f2955q = 22;
        this.f2957s = lVar;
    }
}
