package P;

import I2.AbstractC0319c;
import J3.C;
import J3.w;
import android.app.Application;
import android.view.ActionMode;
import androidx.compose.runtime.MutableState;
import androidx.media3.common.Format;
import androidx.media3.common.util.Util;
import androidx.media3.exoplayer.DecoderReuseEvaluation;
import androidx.media3.exoplayer.audio.AudioRendererEventListener;
import androidx.media3.exoplayer.drm.DrmSessionEventListener;
import androidx.media3.exoplayer.source.MediaLoadData;
import androidx.media3.exoplayer.source.MediaSourceEventListener;
import com.google.android.gms.tasks.TaskCompletionSource;
import com.google.firebase.crashlytics.internal.common.CrashlyticsCore;
import com.google.firebase.firestore.FirebaseFirestoreException;
import com.google.firebase.firestore.LoadBundleTask;
import com.google.firebase.firestore.bundle.BundleReader;
import com.google.firebase.firestore.core.AsyncEventListener;
import com.google.firebase.firestore.core.FirestoreClient;
import com.google.firebase.firestore.util.AsyncQueue;
import com.revenuecat.purchases.PurchasesOrchestrator$Companion$canMakePayments$2$1;
import com.revenuecat.purchases.google.attribution.GoogleDeviceIdentifiersFetcher;
import com.revenuecat.purchases.interfaces.Callback;
import d3.v2;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.Executor;
import java.util.concurrent.Semaphore;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.atomic.AtomicBoolean;

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

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

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

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

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ Object f5548d;

    public /* synthetic */ f(Object obj, Object obj2, Object obj3, int i6) {
        this.f5545a = i6;
        this.f5546b = obj;
        this.f5547c = obj2;
        this.f5548d = obj3;
    }

    @Override // java.lang.Runnable
    public final void run() {
        switch (this.f5545a) {
            case 0:
                h hVar = (h) this.f5546b;
                ActionMode actionModeStartActionMode = hVar.f5552a.startActionMode(new n((d) this.f5547c), 1);
                kotlin.jvm.internal.o.c(hVar.f5559h, actionModeStartActionMode);
                if (actionModeStartActionMode == null) {
                    ((e) this.f5548d).close();
                    return;
                }
                return;
            case 1:
                C3.j jVar = (C3.j) this.f5546b;
                L4.a aVar = (L4.a) this.f5547c;
                ThreadPoolExecutor threadPoolExecutor = (ThreadPoolExecutor) this.f5548d;
                jVar.getClass();
                try {
                    T1.p pVarZ = A4.g.z(jVar.f733a);
                    if (pVarZ == null) {
                        throw new RuntimeException("EmojiCompat font provider not available on this device.");
                    }
                    T1.o oVar = (T1.o) ((T1.g) pVarZ.f6581b);
                    synchronized (oVar.f6609d) {
                        oVar.f6611f = threadPoolExecutor;
                        break;
                    }
                    ((T1.g) pVarZ.f6581b).a(new T1.j(aVar, threadPoolExecutor));
                    return;
                } catch (Throwable th) {
                    aVar.Z(th);
                    threadPoolExecutor.shutdown();
                    return;
                }
            case 2:
                Util.lambda$transformFutureAsync$2((w) this.f5546b, (C) this.f5547c, (J3.q) this.f5548d);
                return;
            case 3:
                Util.lambda$postOrRunWithCompletion$0((C) this.f5546b, (Runnable) this.f5547c, this.f5548d);
                return;
            case 4:
                ((AudioRendererEventListener.EventDispatcher) this.f5546b).lambda$inputFormatChanged$2((Format) this.f5547c, (DecoderReuseEvaluation) this.f5548d);
                return;
            case 5:
                ((DrmSessionEventListener.EventDispatcher) this.f5546b).lambda$drmSessionManagerError$2((DrmSessionEventListener) this.f5547c, (Exception) this.f5548d);
                return;
            case 6:
                ((MediaSourceEventListener.EventDispatcher) this.f5546b).lambda$downstreamFormatChanged$5((MediaSourceEventListener) this.f5547c, (MediaLoadData) this.f5548d);
                return;
            case 7:
                ((CrashlyticsCore) this.f5546b).lambda$logException$1((Throwable) this.f5547c, (Map) this.f5548d);
                return;
            case 8:
                ((AsyncEventListener) this.f5546b).lambda$onEvent$0(this.f5547c, (FirebaseFirestoreException) this.f5548d);
                return;
            case 9:
                ((FirestoreClient) this.f5546b).lambda$loadBundle$19((BundleReader) this.f5547c, (LoadBundleTask) this.f5548d);
                return;
            case 10:
                ((FirestoreClient) this.f5546b).lambda$write$12((List) this.f5547c, (TaskCompletionSource) this.f5548d);
                return;
            case 11:
                ((FirestoreClient) this.f5546b).lambda$getNamedQuery$20((String) this.f5547c, (TaskCompletionSource) this.f5548d);
                return;
            case 12:
                AsyncQueue.lambda$runSync$4((Runnable) this.f5546b, (Throwable[]) this.f5547c, (Semaphore) this.f5548d);
                return;
            case 13:
                AsyncQueue.lambda$callTask$1((Callable) this.f5546b, (Executor) this.f5547c, (TaskCompletionSource) this.f5548d);
                return;
            case 14:
                PurchasesOrchestrator$Companion$canMakePayments$2$1.onBillingServiceDisconnected$lambda$6((AbstractC0319c) this.f5546b, (AtomicBoolean) this.f5547c, (Callback) this.f5548d);
                return;
            case 15:
                GoogleDeviceIdentifiersFetcher.getDeviceIdentifiers$lambda$0((GoogleDeviceIdentifiersFetcher) this.f5546b, (Application) this.f5547c, (J4.c) this.f5548d);
                return;
            default:
                if (((AtomicBoolean) this.f5546b).get()) {
                    return;
                }
                ((MutableState) this.f5547c).setValue(Boolean.FALSE);
                v2.x((MutableState) this.f5548d, true);
                return;
        }
    }
}
