package androidx.fragment.app;

import android.util.Log;
import android.view.View;
import java.util.Objects;

/* JADX INFO: loaded from: classes.dex */
public final class s implements androidx.lifecycle.x {

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

    public s(u uVar) {
        this.f2578a = uVar;
    }

    @Override // androidx.lifecycle.x
    public final void onChanged(Object obj) {
        if (((androidx.lifecycle.p) obj) != null) {
            u uVar = this.f2578a;
            if (uVar.K0) {
                View viewRequireView = uVar.requireView();
                if (viewRequireView.getParent() != null) {
                    throw new IllegalStateException("DialogFragment can not be attached to a container view");
                }
                if (uVar.mDialog != null) {
                    if (Log.isLoggable("FragmentManager", 3)) {
                        Objects.toString(uVar.mDialog);
                    }
                    uVar.mDialog.setContentView(viewRequireView);
                }
            }
        }
    }
}
