package F5;

import Z6.AbstractC0385z;
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import androidx.lifecycle.P;
import androidx.lifecycle.Y;
import com.google.android.gms.internal.measurement.AbstractC0707u1;
import com.martsnew.tv.R;
import h0.DialogInterfaceOnCancelListenerC1017q;
import n4.u0;
import u5.AbstractC1620e;
import v0.AbstractC1664c;
import x6.InterfaceC1724b;

/* JADX INFO: loaded from: classes.dex */
public final class g extends DialogInterfaceOnCancelListenerC1017q implements InterfaceC1724b {

    /* JADX INFO: renamed from: E0, reason: collision with root package name */
    public v6.h f2540E0;

    /* JADX INFO: renamed from: F0, reason: collision with root package name */
    public boolean f2541F0;

    /* JADX INFO: renamed from: G0, reason: collision with root package name */
    public volatile v6.f f2542G0;

    /* JADX INFO: renamed from: H0, reason: collision with root package name */
    public final Object f2543H0 = new Object();

    /* JADX INFO: renamed from: I0, reason: collision with root package name */
    public boolean f2544I0 = false;

    /* JADX INFO: renamed from: J0, reason: collision with root package name */
    public AbstractC1620e f2545J0;
    public final K2.e K0;

    public g() {
        A6.e eVarJ = AbstractC0707u1.j(new A5.f(11, new C0115b(0, this)));
        this.K0 = new K2.e(P6.n.a(C.class), new A5.g(eVarJ, 10), new A5.h(this, eVarJ, 5), new A5.g(eVarJ, 11));
    }

    @Override // h0.ComponentCallbacksC1023x
    public final void D(Activity activity) {
        this.f13276V = true;
        v6.h hVar = this.f2540E0;
        u0.g(hVar == null || v6.f.b(hVar) == activity, "onAttach called multiple times with different Context! Hilt Fragments should not be retained.", new Object[0]);
        j0();
        if (this.f2544I0) {
            return;
        }
        this.f2544I0 = true;
        ((h) l()).getClass();
    }

    @Override // h0.DialogInterfaceOnCancelListenerC1017q, h0.ComponentCallbacksC1023x
    public final void E(Context context) {
        super.E(context);
        j0();
        if (this.f2544I0) {
            return;
        }
        this.f2544I0 = true;
        ((h) l()).getClass();
    }

    @Override // h0.ComponentCallbacksC1023x
    public final View G(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        P6.g.e(layoutInflater, "inflater");
        int i = AbstractC1620e.f17715M;
        AbstractC1620e abstractC1620e = (AbstractC1620e) U.c.b(layoutInflater, R.layout.fragment_all_genre, viewGroup, false);
        this.f2545J0 = abstractC1620e;
        if (abstractC1620e == null) {
            P6.g.h("binding");
            throw null;
        }
        abstractC1620e.f17716K.setOnClickListener(new C5.c(9, this));
        AbstractC0385z.r(P.f(this), null, new f(this, null), 3);
        AbstractC1620e abstractC1620e2 = this.f2545J0;
        if (abstractC1620e2 == null) {
            P6.g.h("binding");
            throw null;
        }
        View view = abstractC1620e2.f6656z;
        P6.g.d(view, "getRoot(...)");
        return view;
    }

    @Override // h0.ComponentCallbacksC1023x, androidx.lifecycle.InterfaceC0505j
    public final Y H() {
        return AbstractC1664c.t(this, super.H());
    }

    @Override // h0.DialogInterfaceOnCancelListenerC1017q, h0.ComponentCallbacksC1023x
    public final LayoutInflater L(Bundle bundle) {
        LayoutInflater layoutInflaterL = super.L(bundle);
        return layoutInflaterL.cloneInContext(new v6.h(layoutInflaterL, this));
    }

    @Override // h0.DialogInterfaceOnCancelListenerC1017q, h0.ComponentCallbacksC1023x
    public final void S() {
        Window window;
        super.S();
        Dialog dialog = this.f13237z0;
        if (dialog == null || (window = dialog.getWindow()) == null) {
            return;
        }
        window.setLayout(-1, -1);
    }

    @Override // h0.DialogInterfaceOnCancelListenerC1017q
    public final Dialog g0(Bundle bundle) {
        Dialog dialogG0 = super.g0(bundle);
        Window window = dialogG0.getWindow();
        if (window != null) {
            window.setBackgroundDrawable(new ColorDrawable(dialogG0.getContext().getColor(R.color.colorBackground95)));
        }
        return dialogG0;
    }

    public final void j0() {
        if (this.f2540E0 == null) {
            this.f2540E0 = new v6.h(super.o(), this);
            this.f2541F0 = s7.l.r(super.o());
        }
    }

    @Override // x6.InterfaceC1724b
    public final Object l() {
        if (this.f2542G0 == null) {
            synchronized (this.f2543H0) {
                try {
                    if (this.f2542G0 == null) {
                        this.f2542G0 = new v6.f(this);
                    }
                } finally {
                }
            }
        }
        return this.f2542G0.l();
    }

    @Override // h0.ComponentCallbacksC1023x
    public final Context o() {
        if (super.o() == null && !this.f2541F0) {
            return null;
        }
        j0();
        return this.f2540E0;
    }
}
