package I5;

import U.g;
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.k;
import y5.v;

/* JADX INFO: loaded from: classes.dex */
public abstract class a<V extends y5.k, B extends U.g> extends v<V, B> implements InterfaceC1724b {
    public v6.h q0;

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

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

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

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

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

    @Override // h0.ComponentCallbacksC1023x
    public final void E(Context context) {
        super.E(context);
        r0();
        if (this.f3379u0) {
            return;
        }
        this.f3379u0 = true;
        ((j) 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));
    }

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

    @Override // h0.ComponentCallbacksC1023x
    public final Context o() {
        if (super.o() == null && !this.f3376r0) {
            return null;
        }
        r0();
        return this.q0;
    }

    public final void r0() {
        if (this.q0 == null) {
            this.q0 = new v6.h(super.o(), this);
            this.f3376r0 = s7.l.r(super.o());
        }
    }
}
