package w5;

import A6.k;
import A6.n;
import B.f;
import G6.i;
import O6.p;
import Z6.InterfaceC0382w;
import android.app.Notification;
import android.content.Intent;
import android.os.Build;
import com.google.android.gms.internal.measurement.C1;
import com.martsnew.tv.R;
import com.martsnew.tv.service.MediaService;

/* JADX INFO: renamed from: w5.c, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C1707c extends i implements p {

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public final /* synthetic */ Intent f18314u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public final /* synthetic */ MediaService f18315v;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C1707c(Intent intent, MediaService mediaService, E6.d dVar) {
        super(2, dVar);
        this.f18314u = intent;
        this.f18315v = mediaService;
    }

    @Override // O6.p
    public final Object k(Object obj, Object obj2) throws Throwable {
        C1707c c1707c = (C1707c) m((E6.d) obj2, (InterfaceC0382w) obj);
        n nVar = n.f457a;
        c1707c.p(nVar);
        return nVar;
    }

    @Override // G6.a
    public final E6.d m(E6.d dVar, Object obj) {
        return new C1707c(this.f18314u, this.f18315v, dVar);
    }

    @Override // G6.a
    public final Object p(Object obj) throws Throwable {
        C1.N(obj);
        String stringExtra = this.f18314u.getStringExtra("extra_media_title");
        int i = MediaService.f11121v;
        MediaService mediaService = this.f18315v;
        f fVar = (f) mediaService.f11123r.getValue();
        String string = mediaService.getString(R.string.title_watching);
        fVar.getClass();
        fVar.f475e = f.b(string);
        fVar.f476f = f.b(stringExtra);
        Notification notificationA = fVar.a();
        int i5 = Build.VERSION.SDK_INT;
        k kVar = mediaService.f11124s;
        if (i5 < 33 || s7.d.h(mediaService, "android.permission.POST_NOTIFICATIONS") == 0) {
            ((B.n) kVar.getValue()).a(notificationA);
        }
        return n.f457a;
    }
}
