package androidx.fragment.app;

import android.content.Context;
import android.os.Bundle;
import android.os.Parcelable;
import android.util.AttributeSet;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;

/* JADX INFO: loaded from: classes.dex */
public final class l0 {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final n0 f2502a;

    public l0(n0 n0Var) {
        this.f2502a = n0Var;
    }

    public final void a() {
        this.f2502a.f2533d.K();
    }

    public void attachHost(@Nullable e0 e0Var) {
        n0 n0Var = this.f2502a;
        n0Var.f2533d.attachController(n0Var, n0Var, e0Var);
    }

    @Deprecated
    public void dumpLoaders(@NonNull String str, @Nullable FileDescriptor fileDescriptor, @NonNull PrintWriter printWriter, @Nullable String[] strArr) {
    }

    @Nullable
    public e0 findFragmentByWho(@NonNull String str) {
        return this.f2502a.f2533d.f2368c.findFragmentByWho(str);
    }

    @Nullable
    public View onCreateView(@Nullable View view, @NonNull String str, @NonNull Context context, @NonNull AttributeSet attributeSet) {
        return this.f2502a.f2533d.f2371f.onCreateView(view, str, context, attributeSet);
    }

    @Deprecated
    public void restoreAllState(@Nullable Parcelable parcelable, @Nullable f1 f1Var) {
        this.f2502a.f2533d.restoreAllState(parcelable, f1Var);
    }

    @Deprecated
    public void restoreSaveState(@Nullable Parcelable parcelable) {
        n0 n0Var = this.f2502a;
        if (!(n0Var instanceof androidx.lifecycle.z0)) {
            throw new IllegalStateException("Your FragmentHostCallback must implement ViewModelStoreOwner to call restoreSaveState(). Call restoreAllState()  if you're still using retainNestedNonConfig().");
        }
        n0Var.f2533d.restoreSaveState(parcelable);
    }

    @Nullable
    @Deprecated
    public androidx.collection.s retainLoaderNonConfig() {
        return null;
    }

    @Nullable
    @Deprecated
    public f1 retainNestedNonConfig() {
        e1 e1Var = this.f2502a.f2533d;
        if (!(e1Var.f2388w instanceof androidx.lifecycle.z0)) {
            return e1Var.N.getSnapshot();
        }
        e1Var.U(new IllegalStateException("You cannot use retainNonConfig when your FragmentHostCallback implements ViewModelStoreOwner."));
        throw null;
    }

    @Nullable
    @Deprecated
    public List<e0> retainNonConfig() {
        e1 e1Var = this.f2502a.f2533d;
        if (e1Var.f2388w instanceof androidx.lifecycle.z0) {
            e1Var.U(new IllegalStateException("You cannot use retainNonConfig when your FragmentHostCallback implements ViewModelStoreOwner."));
            throw null;
        }
        f1 snapshot = e1Var.N.getSnapshot();
        if (snapshot == null || snapshot.getFragments() == null) {
            return null;
        }
        return new ArrayList(snapshot.getFragments());
    }

    @Nullable
    @Deprecated
    public Parcelable saveAllState() {
        e1 e1Var = this.f2502a.f2533d;
        if (e1Var.f2388w instanceof i3.h) {
            e1Var.U(new IllegalStateException("You cannot use saveAllState when your FragmentHostCallback implements SavedStateRegistryOwner."));
            throw null;
        }
        Bundle bundleO = e1Var.O();
        if (bundleO.isEmpty()) {
            return null;
        }
        return bundleO;
    }

    @Deprecated
    public void restoreAllState(@Nullable Parcelable parcelable, @Nullable List<e0> list) {
        this.f2502a.f2533d.restoreAllState(parcelable, new f1(list, null, null));
    }
}
