package d3;

import android.content.Context;
import androidx.media3.exoplayer.ExoPlayer;
import com.debridstream.tv.PlayerViewModel;
import m3.AbstractC2467b;
import w4.C3137A;

/* JADX INFO: loaded from: classes.dex */
public final class A1 extends C4.j implements J4.e {

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

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

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

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public A1(A4.d dVar, Context context, ExoPlayer exoPlayer, PlayerViewModel playerViewModel) {
        super(2, dVar);
        this.f15017b = context;
        this.f15018c = playerViewModel;
        this.f15019d = exoPlayer;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        PlayerViewModel playerViewModel = this.f15018c;
        return new A1(dVar, this.f15017b, this.f15019d, playerViewModel);
    }

    @Override // J4.e
    public final Object invoke(Object obj, Object obj2) {
        return ((A1) create((V4.C) obj, (A4.d) obj2)).invokeSuspend(C3137A.f25453a);
    }

    @Override // C4.a
    public final Object invokeSuspend(Object obj) {
        B4.a aVar = B4.a.f492a;
        int i6 = this.f15016a;
        if (i6 == 0) {
            AbstractC2467b.l(obj);
            Context applicationContext = this.f15017b.getApplicationContext();
            kotlin.jvm.internal.o.g(applicationContext, "getApplicationContext(...)");
            this.f15016a = 1;
            if (v2.g0(applicationContext, this.f15018c, this.f15019d, false, "periodic_local", this) == aVar) {
                return aVar;
            }
        } else {
            if (i6 != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            AbstractC2467b.l(obj);
        }
        return C3137A.f25453a;
    }
}
