package K;

import I2.AbstractC0319c;
import I2.C0328l;
import X0.InterfaceC0807u;
import android.content.Context;
import android.media.AudioTrack;
import android.os.Handler;
import android.os.Trace;
import androidx.compose.runtime.snapshots.MutableSnapshot;
import androidx.compose.runtime.snapshots.Snapshot;
import androidx.media3.common.util.ConditionVariable;
import androidx.media3.exoplayer.audio.AudioSink;
import androidx.media3.exoplayer.audio.DefaultAudioSink;
import c1.C1228c;
import com.google.android.gms.tasks.TaskCompletionSource;
import com.google.firebase.firestore.core.ComponentProvider;
import com.google.firebase.firestore.core.FirestoreClient;
import com.google.firebase.firestore.remote.GrpcMetadataProvider;
import com.revenuecat.purchases.PurchasesOrchestrator$Companion$canMakePayments$2$1;
import com.revenuecat.purchases.interfaces.Callback;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;

/* JADX INFO: renamed from: K.w, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final /* synthetic */ class RunnableC0484w implements Runnable {

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

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

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

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

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

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

    public /* synthetic */ RunnableC0484w(Object obj, Object obj2, Object obj3, Object obj4, Object obj5, int i6) {
        this.f4005a = i6;
        this.f4006b = obj;
        this.f4007c = obj2;
        this.f4008d = obj3;
        this.f4009e = obj4;
        this.f4010f = obj5;
    }

    @Override // java.lang.Runnable
    public final void run() {
        switch (this.f4005a) {
            case 0:
                T0.O o6 = (T0.O) this.f4006b;
                h1.m mVar = (h1.m) this.f4007c;
                String str = (String) this.f4008d;
                h1.c cVar = (h1.c) this.f4009e;
                InterfaceC0807u interfaceC0807u = (InterfaceC0807u) this.f4010f;
                Trace.beginSection("BackgroundTextMeasurement");
                try {
                    MutableSnapshot mutableSnapshotTakeMutableSnapshot$default = Snapshot.Companion.takeMutableSnapshot$default(Snapshot.Companion, null, null, 3, null);
                    try {
                        Snapshot snapshotMakeCurrent = mutableSnapshotTakeMutableSnapshot$default.makeCurrent();
                        try {
                            T0.O oD0 = e4.C.d0(o6, mVar);
                            x4.y yVar = x4.y.f26065a;
                            new C1228c(str, oD0, yVar, yVar, interfaceC0807u, cVar).c();
                            mutableSnapshotTakeMutableSnapshot$default.apply().check();
                            return;
                        } finally {
                            mutableSnapshotTakeMutableSnapshot$default.restoreCurrent(snapshotMakeCurrent);
                        }
                    } finally {
                    }
                } finally {
                    Trace.endSection();
                }
            case 1:
                ConditionVariable conditionVariable = (ConditionVariable) this.f4010f;
                DefaultAudioSink.lambda$releaseAudioTrackAsync$1((AudioTrack) this.f4006b, (AudioSink.Listener) this.f4007c, (Handler) this.f4008d, (AudioSink.AudioTrackConfig) this.f4009e, conditionVariable);
                return;
            case 2:
                ((FirestoreClient) this.f4006b).lambda$new$0((TaskCompletionSource) this.f4007c, (Context) this.f4008d, (ComponentProvider) this.f4009e, (GrpcMetadataProvider) this.f4010f);
                return;
            default:
                PurchasesOrchestrator$Companion$canMakePayments$2$1.onBillingSetupFinished$lambda$3((AtomicBoolean) this.f4006b, (C0328l) this.f4007c, (Callback) this.f4008d, (AbstractC0319c) this.f4009e, (List) this.f4010f);
                return;
        }
    }
}
