package d3;

import O1.C0225a;

/* JADX INFO: renamed from: d3.x1, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class RunnableC0836x1 implements Runnable {

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

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public final /* synthetic */ long f12223r;

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public final /* synthetic */ A1 f12224s;

    public /* synthetic */ RunnableC0836x1(A1 a1, long j8, int i) {
        this.f12222q = i;
        this.f12223r = j8;
        this.f12224s = a1;
    }

    /* JADX WARN: Removed duplicated region for block: B:19:0x00b1  */
    @Override // java.lang.Runnable
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void run() {
        switch (this.f12222q) {
            case n4.u0.f15495q /* 0 */:
                A1 a1 = this.f12224s;
                a1.E();
                a1.I();
                C0817r0 c0817r0 = (C0817r0) a1.f5146q;
                Z z8 = c0817r0.f12150y;
                C0817r0.k(z8);
                long j8 = this.f12223r;
                z8.D.c(Long.valueOf(j8), "Activity resumed, time");
                H h8 = I.f11538b1;
                C0784g c0784g = c0817r0.f12148w;
                boolean zR = c0784g.R(null, h8);
                L0.X x8 = a1.f11427v;
                if (zR) {
                    if (c0784g.S() || a1.f11425t) {
                        ((A1) x8.f3746t).E();
                        ((z1) x8.f3745s).a();
                        x8.f3743q = j8;
                        x8.f3744r = j8;
                    }
                } else if (!c0784g.S()) {
                    C0785g0 c0785g0 = c0817r0.f12149x;
                    C0817r0.i(c0785g0);
                    if (c0785g0.f11964J.b()) {
                        ((A1) x8.f3746t).E();
                        ((z1) x8.f3745s).a();
                        x8.f3743q = j8;
                        x8.f3744r = j8;
                    }
                }
                C0225a c0225a = a1.f11428w;
                A1 a12 = (A1) c0225a.f5011s;
                a12.E();
                RunnableC0839y1 runnableC0839y1 = (RunnableC0839y1) c0225a.f5010r;
                if (runnableC0839y1 != null) {
                    a12.f11424s.removeCallbacks(runnableC0839y1);
                }
                C0817r0 c0817r02 = (C0817r0) a12.f5146q;
                C0785g0 c0785g02 = c0817r02.f12149x;
                C0817r0.i(c0785g02);
                c0785g02.f11964J.a(false);
                a12.E();
                a12.f11425t = false;
                if (c0817r02.f12148w.R(null, I.a1)) {
                    Y0 y02 = c0817r02.f12125F;
                    C0817r0.j(y02);
                    if (y02.D) {
                        Z z9 = c0817r02.f12150y;
                        C0817r0.k(z9);
                        z9.D.b("Retrying trigger URI registration in foreground");
                        C0817r0.j(y02);
                        y02.S();
                    }
                }
                V0 v02 = a1.f11426u;
                A1 a13 = (A1) v02.f11784r;
                a13.E();
                C0817r0 c0817r03 = (C0817r0) a13.f5146q;
                if (c0817r03.f()) {
                    c0817r03.D.getClass();
                    v02.x(System.currentTimeMillis());
                    break;
                }
                break;
            default:
                A1 a14 = this.f12224s;
                a14.E();
                a14.I();
                C0817r0 c0817r04 = (C0817r0) a14.f5146q;
                Z z10 = c0817r04.f12150y;
                C0817r0.k(z10);
                long j9 = this.f12223r;
                z10.D.c(Long.valueOf(j9), "Activity paused, time");
                C0225a c0225a2 = a14.f11428w;
                A1 a15 = (A1) c0225a2.f5011s;
                ((C0817r0) a15.f5146q).D.getClass();
                RunnableC0839y1 runnableC0839y12 = new RunnableC0839y1(c0225a2, System.currentTimeMillis(), j9);
                c0225a2.f5010r = runnableC0839y12;
                a15.f11424s.postDelayed(runnableC0839y12, 2000L);
                if (c0817r04.f12148w.S()) {
                    ((z1) a14.f11427v.f3745s).a();
                }
                break;
        }
    }
}
