package Z5;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import androidx.lifecycle.Y;
import n4.u0;
import v0.AbstractC1664c;
import x6.InterfaceC1724b;
import y5.AbstractC1757b;

/* JADX INFO: loaded from: classes.dex */
public abstract class a extends AbstractC1757b implements InterfaceC1724b {

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

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

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

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

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

    @Override // h0.ComponentCallbacksC1023x
    public final void D(Activity activity) {
        this.f13276V = true;
        v6.h hVar = this.f7429D1;
        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]);
        X0();
        if (this.f7433H1) {
            return;
        }
        this.f7433H1 = true;
        ((h) l()).getClass();
    }

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

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

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

    public final void X0() {
        if (this.f7429D1 == null) {
            this.f7429D1 = new v6.h(super.o(), this);
            this.f7430E1 = s7.l.r(super.o());
        }
    }

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

    @Override // h0.ComponentCallbacksC1023x
    public final Context o() {
        if (super.o() == null && !this.f7430E1) {
            return null;
        }
        X0();
        return this.f7429D1;
    }
}
