package com.google.android.gms.measurement.internal;

import android.os.Bundle;
import java.util.concurrent.atomic.AtomicReference;

/* JADX INFO: loaded from: classes2.dex */
public final /* synthetic */ class h2 implements Runnable {

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ AtomicReference f21651b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ g2 f21652c;

    public /* synthetic */ h2(g2 g2Var, AtomicReference atomicReference, int i10) {
        this.f21650a = i10;
        this.f21652c = g2Var;
        this.f21651b = atomicReference;
    }

    private final void a() {
        synchronized (this.f21651b) {
            try {
                try {
                    AtomicReference atomicReference = this.f21651b;
                    g gVarS = this.f21652c.s();
                    String strG = this.f21652c.x().G();
                    gVarS.getClass();
                    atomicReference.set(Boolean.valueOf(gVarS.J(strG, z.M)));
                } finally {
                    this.f21651b.notify();
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    @Override // java.lang.Runnable
    public final void run() {
        switch (this.f21650a) {
            case 0:
                AtomicReference atomicReference = this.f21651b;
                g2 g2Var = this.f21652c;
                Bundle bundleO = g2Var.u().f21997o.o();
                a3 a3VarB = g2Var.B();
                if (bundleO == null) {
                    bundleO = new Bundle();
                }
                a3VarB.w();
                a3VarB.D();
                a3VarB.I(new k.h(a3VarB, atomicReference, a3VarB.S(false), bundleO, 11));
                return;
            case 1:
                a();
                return;
            case 2:
                synchronized (this.f21651b) {
                    try {
                        try {
                            AtomicReference atomicReference2 = this.f21651b;
                            g gVarS = this.f21652c.s();
                            String strG = this.f21652c.x().G();
                            gVarS.getClass();
                            atomicReference2.set(gVarS.G(strG, z.N));
                        } finally {
                        }
                    } finally {
                    }
                }
                return;
            case 3:
                synchronized (this.f21651b) {
                    try {
                        try {
                            this.f21651b.set(Integer.valueOf(this.f21652c.s().C(this.f21652c.x().G(), z.P)));
                        } finally {
                        }
                    } finally {
                    }
                }
                return;
            case 4:
                synchronized (this.f21651b) {
                    try {
                        try {
                            this.f21651b.set(Long.valueOf(this.f21652c.s().E(this.f21652c.x().G(), z.O)));
                        } finally {
                        }
                    } finally {
                    }
                }
                return;
            default:
                synchronized (this.f21651b) {
                    try {
                        try {
                            this.f21651b.set(Double.valueOf(this.f21652c.s().x(this.f21652c.x().G(), z.Q)));
                        } finally {
                        }
                    } finally {
                    }
                }
                return;
        }
    }
}
