package androidx.fragment.app;

import android.animation.Animator;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Application;
import android.content.ComponentCallbacks;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Bundle;
import android.os.Looper;
import android.os.Parcelable;
import android.util.AttributeSet;
import android.util.Log;
import android.util.SparseArray;
import android.view.ContextMenu;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.activity.result.ActivityResultRegistry;
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.lang.reflect.InvocationTargetException;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import p037.p038.p039.AbstractC1459;
import p037.p038.p039.InterfaceC1458;
import p037.p038.p039.InterfaceC1460;
import p037.p038.p039.p040.AbstractC1463;
import p037.p052.p053.p056.InterfaceC1713;
import p037.p065.p067.AbstractC1848;
import p037.p065.p068.C1850;
import p037.p089.p090.AbstractC2007;
import p037.p089.p090.AbstractC2010;
import p037.p089.p090.AbstractC2014;
import p037.p089.p090.ActivityC1999;
import p037.p089.p090.C1998;
import p037.p089.p090.C2009;
import p037.p089.p090.C2032;
import p037.p089.p090.C2035;
import p037.p089.p090.C2062;
import p037.p089.p090.C2071;
import p037.p099.AbstractC2210;
import p037.p099.C2221;
import p037.p099.C2229;
import p037.p099.C2242;
import p037.p099.C2251;
import p037.p099.InterfaceC2209;
import p037.p099.InterfaceC2217;
import p037.p099.InterfaceC2219;
import p037.p099.InterfaceC2247;
import p037.p099.InterfaceC2252;
import p037.p099.p100.C2253;
import p037.p099.p101.C2254;
import p037.p102.p103.AbstractC2255;
import p037.p102.p103.C2256;
import p037.p112.C2429;
import p037.p112.C2430;
import p037.p112.C2433;
import p037.p112.InterfaceC2434;
import p138.p139.p143.p144.C2803;

/* JADX INFO: loaded from: classes.dex */
public class Fragment implements ComponentCallbacks, View.OnCreateContextMenuListener, InterfaceC2219, InterfaceC2252, InterfaceC2209, InterfaceC2434 {
    public static final Object USE_DEFAULT_TRANSITION = new Object();
    public boolean mAdded;
    public C0088 mAnimationInfo;
    public Bundle mArguments;
    public int mBackStackNesting;
    public boolean mCalled;
    public AbstractC2014 mChildFragmentManager;
    public ViewGroup mContainer;
    public int mContainerId;
    public int mContentLayoutId;
    public InterfaceC2247 mDefaultFactory;
    public boolean mDeferStart;
    public boolean mDetached;
    public int mFragmentId;
    public AbstractC2014 mFragmentManager;
    public boolean mFromLayout;
    public boolean mHasMenu;
    public boolean mHidden;
    public boolean mHiddenChanged;
    public AbstractC2010<?> mHost;
    public boolean mInLayout;
    public boolean mIsCreated;
    public boolean mIsNewlyAdded;
    public Boolean mIsPrimaryNavigationFragment;
    public LayoutInflater mLayoutInflater;
    public C2221 mLifecycleRegistry;
    public AbstractC2210.EnumC2212 mMaxState;
    public boolean mMenuVisible;
    public final AtomicInteger mNextLocalRequestCode;
    public Fragment mParentFragment;
    public boolean mPerformedCreateView;
    public float mPostponedAlpha;
    public boolean mRemoving;
    public boolean mRestored;
    public boolean mRetainInstance;
    public boolean mRetainInstanceChangedWhileDetached;
    public Bundle mSavedFragmentState;
    public C2433 mSavedStateRegistryController;
    public Boolean mSavedUserVisibleHint;
    public SparseArray<Parcelable> mSavedViewState;
    public int mState;
    public String mTag;
    public Fragment mTarget;
    public int mTargetRequestCode;
    public String mTargetWho;
    public boolean mUserVisibleHint;
    public View mView;
    public C2062 mViewLifecycleOwner;
    public C2229<InterfaceC2219> mViewLifecycleOwnerLiveData;
    public String mWho;

    public static class InstantiationException extends RuntimeException {
        public InstantiationException(String str, Exception exc) {
            super(str, exc);
        }
    }

    /* JADX INFO: renamed from: androidx.fragment.app.Fragment$֏, reason: contains not printable characters */
    public class RunnableC0085 implements Runnable {
        public RunnableC0085() {
        }

        @Override // java.lang.Runnable
        public void run() {
            Fragment.this.callStartTransitionListener();
        }
    }

    /* JADX INFO: renamed from: androidx.fragment.app.Fragment$ؠ, reason: contains not printable characters */
    public class C0086 extends AbstractC2007 {
        public C0086() {
        }

        @Override // p037.p089.p090.AbstractC2007
        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public View mo258(int i) {
            View view = Fragment.this.mView;
            if (view != null) {
                return view.findViewById(i);
            }
            StringBuilder sbM4889 = C2803.m4889("Fragment ");
            sbM4889.append(Fragment.this);
            sbM4889.append(" does not have a view");
            throw new IllegalStateException(sbM4889.toString());
        }

        @Override // p037.p089.p090.AbstractC2007
        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public boolean mo259() {
            return Fragment.this.mView != null;
        }
    }

    /* JADX INFO: renamed from: androidx.fragment.app.Fragment$ހ, reason: contains not printable characters */
    public class C0087 implements InterfaceC1713<Void, ActivityResultRegistry> {
        public C0087() {
        }

        @Override // p037.p052.p053.p056.InterfaceC1713
        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public ActivityResultRegistry mo260(Void r3) {
            Fragment fragment = Fragment.this;
            Object obj = fragment.mHost;
            return obj instanceof InterfaceC1460 ? ((InterfaceC1460) obj).getActivityResultRegistry() : fragment.requireActivity().mActivityResultRegistry;
        }
    }

    /* JADX INFO: renamed from: androidx.fragment.app.Fragment$ށ, reason: contains not printable characters */
    public static class C0088 {

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public View f640;

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public Animator f641;

        /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
        public int f642;

        /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
        public int f643;

        /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
        public Object f644 = null;

        /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
        public Object f645;

        /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
        public Object f646;

        /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
        public Object f647;

        /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
        public Object f648;

        /* JADX INFO: renamed from: އ, reason: contains not printable characters */
        public Object f649;

        /* JADX INFO: renamed from: ވ, reason: contains not printable characters */
        public Boolean f650;

        /* JADX INFO: renamed from: މ, reason: contains not printable characters */
        public Boolean f651;

        /* JADX INFO: renamed from: ފ, reason: contains not printable characters */
        public AbstractC1848 f652;

        /* JADX INFO: renamed from: ދ, reason: contains not printable characters */
        public AbstractC1848 f653;

        /* JADX INFO: renamed from: ތ, reason: contains not printable characters */
        public boolean f654;

        /* JADX INFO: renamed from: ލ, reason: contains not printable characters */
        public InterfaceC0089 f655;

        /* JADX INFO: renamed from: ގ, reason: contains not printable characters */
        public boolean f656;

        public C0088() {
            Object obj = Fragment.USE_DEFAULT_TRANSITION;
            this.f645 = obj;
            this.f646 = null;
            this.f647 = obj;
            this.f648 = null;
            this.f649 = obj;
            this.f652 = null;
            this.f653 = null;
        }
    }

    /* JADX INFO: renamed from: androidx.fragment.app.Fragment$ނ, reason: contains not printable characters */
    public interface InterfaceC0089 {
    }

    public Fragment() {
        this.mState = -1;
        this.mWho = UUID.randomUUID().toString();
        this.mTargetWho = null;
        this.mIsPrimaryNavigationFragment = null;
        this.mChildFragmentManager = new C2032();
        this.mMenuVisible = true;
        this.mUserVisibleHint = true;
        this.mMaxState = AbstractC2210.EnumC2212.RESUMED;
        this.mViewLifecycleOwnerLiveData = new C2229<>();
        this.mNextLocalRequestCode = new AtomicInteger();
        initLifecycle();
    }

    public Fragment(int i) {
        this();
        this.mContentLayoutId = i;
    }

    @Deprecated
    public static Fragment instantiate(Context context, String str, Bundle bundle) {
        try {
            Fragment fragmentNewInstance = C2009.m3883(context.getClassLoader(), str).getConstructor(new Class[0]).newInstance(new Object[0]);
            if (bundle != null) {
                bundle.setClassLoader(fragmentNewInstance.getClass().getClassLoader());
                fragmentNewInstance.setArguments(bundle);
            }
            return fragmentNewInstance;
        } catch (IllegalAccessException e) {
            throw new InstantiationException(C2803.m4880("Unable to instantiate fragment ", str, ": make sure class name exists, is public, and has an empty constructor that is public"), e);
        } catch (java.lang.InstantiationException e2) {
            throw new InstantiationException(C2803.m4880("Unable to instantiate fragment ", str, ": make sure class name exists, is public, and has an empty constructor that is public"), e2);
        } catch (NoSuchMethodException e3) {
            throw new InstantiationException(C2803.m4880("Unable to instantiate fragment ", str, ": could not find Fragment constructor"), e3);
        } catch (InvocationTargetException e4) {
            throw new InstantiationException(C2803.m4880("Unable to instantiate fragment ", str, ": calling Fragment constructor caused an exception"), e4);
        }
    }

    public void callStartTransitionListener() {
        C0088 c0088 = this.mAnimationInfo;
        InterfaceC0089 interfaceC0089 = null;
        if (c0088 != null) {
            c0088.f654 = false;
            InterfaceC0089 interfaceC00892 = c0088.f655;
            c0088.f655 = null;
            interfaceC0089 = interfaceC00892;
        }
        if (interfaceC0089 != null) {
            AbstractC2014.C2030 c2030 = (AbstractC2014.C2030) interfaceC0089;
            int i = c2030.f6656 - 1;
            c2030.f6656 = i;
            if (i != 0) {
                return;
            }
            c2030.f6655.f6532.m3963();
        }
    }

    public AbstractC2007 createFragmentContainer() {
        return new C0086();
    }

    public void dump(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
        printWriter.print(str);
        printWriter.print("mFragmentId=#");
        printWriter.print(Integer.toHexString(this.mFragmentId));
        printWriter.print(" mContainerId=#");
        printWriter.print(Integer.toHexString(this.mContainerId));
        printWriter.print(" mTag=");
        printWriter.println(this.mTag);
        printWriter.print(str);
        printWriter.print("mState=");
        printWriter.print(this.mState);
        printWriter.print(" mWho=");
        printWriter.print(this.mWho);
        printWriter.print(" mBackStackNesting=");
        printWriter.println(this.mBackStackNesting);
        printWriter.print(str);
        printWriter.print("mAdded=");
        printWriter.print(this.mAdded);
        printWriter.print(" mRemoving=");
        printWriter.print(this.mRemoving);
        printWriter.print(" mFromLayout=");
        printWriter.print(this.mFromLayout);
        printWriter.print(" mInLayout=");
        printWriter.println(this.mInLayout);
        printWriter.print(str);
        printWriter.print("mHidden=");
        printWriter.print(this.mHidden);
        printWriter.print(" mDetached=");
        printWriter.print(this.mDetached);
        printWriter.print(" mMenuVisible=");
        printWriter.print(this.mMenuVisible);
        printWriter.print(" mHasMenu=");
        printWriter.println(false);
        printWriter.print(str);
        printWriter.print("mRetainInstance=");
        printWriter.print(this.mRetainInstance);
        printWriter.print(" mUserVisibleHint=");
        printWriter.println(this.mUserVisibleHint);
        if (this.mFragmentManager != null) {
            printWriter.print(str);
            printWriter.print("mFragmentManager=");
            printWriter.println(this.mFragmentManager);
        }
        if (this.mHost != null) {
            printWriter.print(str);
            printWriter.print("mHost=");
            printWriter.println(this.mHost);
        }
        if (this.mParentFragment != null) {
            printWriter.print(str);
            printWriter.print("mParentFragment=");
            printWriter.println(this.mParentFragment);
        }
        if (this.mArguments != null) {
            printWriter.print(str);
            printWriter.print("mArguments=");
            printWriter.println(this.mArguments);
        }
        if (this.mSavedFragmentState != null) {
            printWriter.print(str);
            printWriter.print("mSavedFragmentState=");
            printWriter.println(this.mSavedFragmentState);
        }
        if (this.mSavedViewState != null) {
            printWriter.print(str);
            printWriter.print("mSavedViewState=");
            printWriter.println(this.mSavedViewState);
        }
        Fragment targetFragment = getTargetFragment();
        if (targetFragment != null) {
            printWriter.print(str);
            printWriter.print("mTarget=");
            printWriter.print(targetFragment);
            printWriter.print(" mTargetRequestCode=");
            printWriter.println(this.mTargetRequestCode);
        }
        if (getNextAnim() != 0) {
            printWriter.print(str);
            printWriter.print("mNextAnim=");
            printWriter.println(getNextAnim());
        }
        if (this.mContainer != null) {
            printWriter.print(str);
            printWriter.print("mContainer=");
            printWriter.println(this.mContainer);
        }
        if (this.mView != null) {
            printWriter.print(str);
            printWriter.print("mView=");
            printWriter.println(this.mView);
        }
        if (getAnimatingAway() != null) {
            printWriter.print(str);
            printWriter.print("mAnimatingAway=");
            printWriter.println(getAnimatingAway());
        }
        if (getContext() != null) {
            AbstractC2255.m4307(this).mo4308(str, fileDescriptor, printWriter, strArr);
        }
        printWriter.print(str);
        printWriter.println("Child " + this.mChildFragmentManager + ":");
        this.mChildFragmentManager.m3912(C2803.m4879(str, "  "), fileDescriptor, printWriter, strArr);
    }

    public final C0088 ensureAnimationInfo() {
        if (this.mAnimationInfo == null) {
            this.mAnimationInfo = new C0088();
        }
        return this.mAnimationInfo;
    }

    public final boolean equals(Object obj) {
        return super.equals(obj);
    }

    public final ActivityC1999 getActivity() {
        AbstractC2010<?> abstractC2010 = this.mHost;
        if (abstractC2010 == null) {
            return null;
        }
        return (ActivityC1999) abstractC2010.f6594;
    }

    public View getAnimatingAway() {
        C0088 c0088 = this.mAnimationInfo;
        if (c0088 == null) {
            return null;
        }
        return c0088.f640;
    }

    public final AbstractC2014 getChildFragmentManager() {
        if (this.mHost != null) {
            return this.mChildFragmentManager;
        }
        throw new IllegalStateException(C2803.m4877("Fragment ", this, " has not been attached yet."));
    }

    public Context getContext() {
        AbstractC2010<?> abstractC2010 = this.mHost;
        if (abstractC2010 == null) {
            return null;
        }
        return abstractC2010.f6595;
    }

    @Override // p037.p099.InterfaceC2209
    public InterfaceC2247 getDefaultViewModelProviderFactory() {
        if (this.mFragmentManager == null) {
            throw new IllegalStateException("Can't access ViewModels from detached fragment");
        }
        if (this.mDefaultFactory == null) {
            Application application = null;
            Context applicationContext = requireContext().getApplicationContext();
            while (true) {
                if (!(applicationContext instanceof ContextWrapper)) {
                    break;
                }
                if (applicationContext instanceof Application) {
                    application = (Application) applicationContext;
                    break;
                }
                applicationContext = ((ContextWrapper) applicationContext).getBaseContext();
            }
            if (application == null && AbstractC2014.m3899(3)) {
                StringBuilder sbM4889 = C2803.m4889("Could not find Application instance from Context ");
                sbM4889.append(requireContext().getApplicationContext());
                sbM4889.append(", you will not be able to use AndroidViewModel with the default ViewModelProvider.Factory");
                Log.d("FragmentManager", sbM4889.toString());
            }
            this.mDefaultFactory = new C2242(application, this, this.mArguments);
        }
        return this.mDefaultFactory;
    }

    public Object getEnterTransition() {
        C0088 c0088 = this.mAnimationInfo;
        if (c0088 == null) {
            return null;
        }
        return c0088.f644;
    }

    public Object getExitTransition() {
        C0088 c0088 = this.mAnimationInfo;
        if (c0088 == null) {
            return null;
        }
        return c0088.f646;
    }

    @Override // p037.p099.InterfaceC2219
    public AbstractC2210 getLifecycle() {
        return this.mLifecycleRegistry;
    }

    public int getNextAnim() {
        C0088 c0088 = this.mAnimationInfo;
        if (c0088 == null) {
            return 0;
        }
        return c0088.f642;
    }

    public final AbstractC2014 getParentFragmentManager() {
        AbstractC2014 abstractC2014 = this.mFragmentManager;
        if (abstractC2014 != null) {
            return abstractC2014;
        }
        throw new IllegalStateException(C2803.m4877("Fragment ", this, " not associated with a fragment manager."));
    }

    public Object getReenterTransition() {
        C0088 c0088 = this.mAnimationInfo;
        if (c0088 == null) {
            return null;
        }
        Object obj = c0088.f647;
        return obj == USE_DEFAULT_TRANSITION ? getExitTransition() : obj;
    }

    public final Resources getResources() {
        return requireContext().getResources();
    }

    public Object getReturnTransition() {
        C0088 c0088 = this.mAnimationInfo;
        if (c0088 == null) {
            return null;
        }
        Object obj = c0088.f645;
        return obj == USE_DEFAULT_TRANSITION ? getEnterTransition() : obj;
    }

    @Override // p037.p112.InterfaceC2434
    public final C2430 getSavedStateRegistry() {
        return this.mSavedStateRegistryController.f7708;
    }

    public Object getSharedElementEnterTransition() {
        C0088 c0088 = this.mAnimationInfo;
        if (c0088 == null) {
            return null;
        }
        return c0088.f648;
    }

    public final String getString(int i) {
        return getResources().getString(i);
    }

    public final String getString(int i, Object... objArr) {
        return getResources().getString(i, objArr);
    }

    @Deprecated
    public final Fragment getTargetFragment() {
        String str;
        Fragment fragment = this.mTarget;
        if (fragment != null) {
            return fragment;
        }
        AbstractC2014 abstractC2014 = this.mFragmentManager;
        if (abstractC2014 == null || (str = this.mTargetWho) == null) {
            return null;
        }
        return abstractC2014.m3900(str);
    }

    public InterfaceC2219 getViewLifecycleOwner() {
        C2062 c2062 = this.mViewLifecycleOwner;
        if (c2062 != null) {
            return c2062;
        }
        throw new IllegalStateException("Can't access the Fragment View's LifecycleOwner when getView() is null i.e., before onCreateView() or after onDestroyView()");
    }

    @Override // p037.p099.InterfaceC2252
    public C2251 getViewModelStore() {
        AbstractC2014 abstractC2014 = this.mFragmentManager;
        if (abstractC2014 == null) {
            throw new IllegalStateException("Can't access ViewModels from detached fragment");
        }
        C2035 c2035 = abstractC2014.f6639;
        C2251 c2251 = c2035.f6671.get(this.mWho);
        if (c2251 != null) {
            return c2251;
        }
        C2251 c22512 = new C2251();
        c2035.f6671.put(this.mWho, c22512);
        return c22512;
    }

    public final int hashCode() {
        return super.hashCode();
    }

    public final void initLifecycle() {
        this.mLifecycleRegistry = new C2221(this);
        this.mSavedStateRegistryController = new C2433(this);
        this.mLifecycleRegistry.mo4273(new InterfaceC2217() { // from class: androidx.fragment.app.Fragment.2
            @Override // p037.p099.InterfaceC2217
            /* JADX INFO: renamed from: ֏ */
            public void mo87(InterfaceC2219 interfaceC2219, AbstractC2210.EnumC2211 enumC2211) {
                View view;
                if (enumC2211 != AbstractC2210.EnumC2211.ON_STOP || (view = Fragment.this.mView) == null) {
                    return;
                }
                view.cancelPendingInputEvents();
            }
        });
    }

    public final boolean isAdded() {
        return this.mHost != null && this.mAdded;
    }

    public boolean isHideReplaced() {
        C0088 c0088 = this.mAnimationInfo;
        if (c0088 == null) {
            return false;
        }
        return c0088.f656;
    }

    public final boolean isInBackStack() {
        return this.mBackStackNesting > 0;
    }

    public final boolean isMenuVisible() {
        if (this.mMenuVisible) {
            if (this.mFragmentManager == null) {
                return true;
            }
            Fragment fragment = this.mParentFragment;
            if (fragment == null ? true : fragment.isMenuVisible()) {
                return true;
            }
        }
        return false;
    }

    public final boolean isRemovingParent() {
        Fragment fragment = this.mParentFragment;
        return fragment != null && (fragment.mRemoving || fragment.isRemovingParent());
    }

    public final boolean isVisible() {
        View view;
        return (!isAdded() || this.mHidden || (view = this.mView) == null || view.getWindowToken() == null || this.mView.getVisibility() != 0) ? false : true;
    }

    @Deprecated
    public void onAttach(Activity activity) {
        this.mCalled = true;
    }

    public void onAttach(Context context) {
        this.mCalled = true;
        AbstractC2010<?> abstractC2010 = this.mHost;
        Activity activity = abstractC2010 == null ? null : abstractC2010.f6594;
        if (activity != null) {
            this.mCalled = false;
            onAttach(activity);
        }
    }

    @Override // android.content.ComponentCallbacks
    public void onConfigurationChanged(Configuration configuration) {
        this.mCalled = true;
    }

    public void onCreate(Bundle bundle) {
        Parcelable parcelable;
        this.mCalled = true;
        if (bundle != null && (parcelable = bundle.getParcelable("android:support:fragments")) != null) {
            this.mChildFragmentManager.m3906(parcelable);
            this.mChildFragmentManager.m3926();
        }
        if (this.mChildFragmentManager.f6617 >= 1) {
            return;
        }
        this.mChildFragmentManager.m3926();
    }

    @Override // android.view.View.OnCreateContextMenuListener
    public void onCreateContextMenu(ContextMenu contextMenu, View view, ContextMenu.ContextMenuInfo contextMenuInfo) {
        requireActivity().onCreateContextMenu(contextMenu, view, contextMenuInfo);
    }

    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        int i = this.mContentLayoutId;
        if (i != 0) {
            return layoutInflater.inflate(i, viewGroup, false);
        }
        return null;
    }

    public void onDestroy() {
        this.mCalled = true;
    }

    public void onDestroyView() {
        this.mCalled = true;
    }

    public void onDetach() {
        this.mCalled = true;
    }

    public LayoutInflater onGetLayoutInflater(Bundle bundle) {
        AbstractC2010<?> abstractC2010 = this.mHost;
        if (abstractC2010 == null) {
            throw new IllegalStateException("onGetLayoutInflater() cannot be executed until the Fragment is attached to the FragmentManager.");
        }
        ActivityC1999.C2000 c2000 = (ActivityC1999.C2000) abstractC2010;
        LayoutInflater layoutInflaterCloneInContext = ActivityC1999.this.getLayoutInflater().cloneInContext(ActivityC1999.this);
        layoutInflaterCloneInContext.setFactory2(this.mChildFragmentManager.f6607);
        return layoutInflaterCloneInContext;
    }

    public void onInflate(AttributeSet attributeSet, Bundle bundle) {
        this.mCalled = true;
        AbstractC2010<?> abstractC2010 = this.mHost;
        if ((abstractC2010 == null ? null : abstractC2010.f6594) != null) {
            this.mCalled = false;
            this.mCalled = true;
        }
    }

    @Override // android.content.ComponentCallbacks
    public void onLowMemory() {
        this.mCalled = true;
    }

    public void onPause() {
        this.mCalled = true;
    }

    public void onPictureInPictureModeChanged(boolean z) {
    }

    public void onResume() {
        this.mCalled = true;
    }

    public void onSaveInstanceState(Bundle bundle) {
    }

    public void onStart() {
        this.mCalled = true;
    }

    public void onStop() {
        this.mCalled = true;
    }

    public void onViewCreated(View view, Bundle bundle) {
    }

    public void onViewStateRestored(Bundle bundle) {
        this.mCalled = true;
    }

    public void performCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        this.mChildFragmentManager.m3955();
        this.mPerformedCreateView = true;
        this.mViewLifecycleOwner = new C2062();
        View viewOnCreateView = onCreateView(layoutInflater, viewGroup, bundle);
        this.mView = viewOnCreateView;
        if (viewOnCreateView == null) {
            if (this.mViewLifecycleOwner.f6788 != null) {
                throw new IllegalStateException("Called getViewLifecycleOwner() but onCreateView() returned null");
            }
            this.mViewLifecycleOwner = null;
            return;
        }
        C2062 c2062 = this.mViewLifecycleOwner;
        if (c2062.f6788 == null) {
            c2062.f6788 = new C2221(c2062);
        }
        this.mView.setTag(C2253.view_tree_lifecycle_owner, this.mViewLifecycleOwner);
        this.mView.setTag(C2254.view_tree_view_model_store_owner, this);
        this.mView.setTag(C2429.view_tree_saved_state_registry_owner, this);
        this.mViewLifecycleOwnerLiveData.mo345(this.mViewLifecycleOwner);
    }

    public void performDestroyView() {
        this.mChildFragmentManager.m3902(1);
        if (this.mView != null) {
            C2062 c2062 = this.mViewLifecycleOwner;
            c2062.f6788.m4280(AbstractC2210.EnumC2211.ON_DESTROY);
        }
        this.mState = 1;
        this.mCalled = false;
        onDestroyView();
        if (!this.mCalled) {
            throw new C2071(C2803.m4877("Fragment ", this, " did not call through to super.onDestroyView()"));
        }
        C2256.C2259 c2259 = ((C2256) AbstractC2255.m4307(this)).f7213;
        int iM3397 = c2259.f7217.m3397();
        for (int i = 0; i < iM3397; i++) {
            InterfaceC2219 interfaceC2219 = c2259.f7217.m3393(i).f7214;
        }
        this.mPerformedCreateView = false;
    }

    public LayoutInflater performGetLayoutInflater(Bundle bundle) {
        LayoutInflater layoutInflaterOnGetLayoutInflater = onGetLayoutInflater(bundle);
        this.mLayoutInflater = layoutInflaterOnGetLayoutInflater;
        return layoutInflaterOnGetLayoutInflater;
    }

    public final <I, O> AbstractC1459<I> registerForActivityResult(final AbstractC1463<I, O> abstractC1463, final InterfaceC1458<O> interfaceC1458) {
        final C0087 c0087 = new C0087();
        final AtomicReference atomicReference = new AtomicReference();
        this.mLifecycleRegistry.mo4273(new InterfaceC2217() { // from class: androidx.fragment.app.Fragment.7
            @Override // p037.p099.InterfaceC2217
            /* JADX INFO: renamed from: ֏ */
            public void mo87(InterfaceC2219 interfaceC2219, AbstractC2210.EnumC2211 enumC2211) {
                if (AbstractC2210.EnumC2211.ON_CREATE.equals(enumC2211)) {
                    Fragment fragment = Fragment.this;
                    if (fragment == null) {
                        throw null;
                    }
                    StringBuilder sbM4889 = C2803.m4889("fragment_");
                    sbM4889.append(fragment.mWho);
                    sbM4889.append("_rq#");
                    sbM4889.append(fragment.mNextLocalRequestCode.getAndIncrement());
                    String string = sbM4889.toString();
                    atomicReference.set(((ActivityResultRegistry) c0087.mo260(null)).m92(string, Fragment.this, abstractC1463, interfaceC1458));
                }
            }
        });
        return new C1998(this, atomicReference);
    }

    public final ActivityC1999 requireActivity() {
        ActivityC1999 activity = getActivity();
        if (activity != null) {
            return activity;
        }
        throw new IllegalStateException(C2803.m4877("Fragment ", this, " not attached to an activity."));
    }

    public final Context requireContext() {
        Context context = getContext();
        if (context != null) {
            return context;
        }
        throw new IllegalStateException(C2803.m4877("Fragment ", this, " not attached to a context."));
    }

    public final View requireView() {
        View view = this.mView;
        if (view != null) {
            return view;
        }
        throw new IllegalStateException(C2803.m4877("Fragment ", this, " did not return a View from onCreateView() or this was called before onCreateView()."));
    }

    public void setAnimatingAway(View view) {
        ensureAnimationInfo().f640 = view;
    }

    public void setAnimator(Animator animator) {
        ensureAnimationInfo().f641 = animator;
    }

    public void setArguments(Bundle bundle) {
        AbstractC2014 abstractC2014 = this.mFragmentManager;
        if (abstractC2014 != null) {
            if (abstractC2014 == null ? false : abstractC2014.m3953()) {
                throw new IllegalStateException("Fragment already added and state has been saved");
            }
        }
        this.mArguments = bundle;
    }

    public void setEnterTransition(Object obj) {
        ensureAnimationInfo().f644 = obj;
    }

    public void setHideReplaced(boolean z) {
        ensureAnimationInfo().f656 = z;
    }

    public void setNextAnim(int i) {
        if (this.mAnimationInfo == null && i == 0) {
            return;
        }
        ensureAnimationInfo().f642 = i;
    }

    public void setOnStartEnterTransitionListener(InterfaceC0089 interfaceC0089) {
        ensureAnimationInfo();
        InterfaceC0089 interfaceC00892 = this.mAnimationInfo.f655;
        if (interfaceC0089 == interfaceC00892) {
            return;
        }
        if (interfaceC0089 != null && interfaceC00892 != null) {
            throw new IllegalStateException("Trying to set a replacement startPostponedEnterTransition on " + this);
        }
        C0088 c0088 = this.mAnimationInfo;
        if (c0088.f654) {
            c0088.f655 = interfaceC0089;
        }
        if (interfaceC0089 != null) {
            ((AbstractC2014.C2030) interfaceC0089).f6656++;
        }
    }

    public void setSharedElementEnterTransition(Object obj) {
        ensureAnimationInfo().f648 = obj;
    }

    @Deprecated
    public void setTargetFragment(Fragment fragment, int i) {
        AbstractC2014 abstractC2014 = this.mFragmentManager;
        AbstractC2014 abstractC20142 = fragment != null ? fragment.mFragmentManager : null;
        if (abstractC2014 != null && abstractC20142 != null && abstractC2014 != abstractC20142) {
            throw new IllegalArgumentException(C2803.m4877("Fragment ", fragment, " must share the same FragmentManager to be set as a target fragment"));
        }
        for (Fragment targetFragment = fragment; targetFragment != null; targetFragment = targetFragment.getTargetFragment()) {
            if (super.equals(this)) {
                throw new IllegalArgumentException("Setting " + fragment + " as the target of " + this + " would create a target cycle");
            }
        }
        if (fragment == null) {
            this.mTargetWho = null;
            this.mTarget = null;
        } else if (this.mFragmentManager == null || fragment.mFragmentManager == null) {
            this.mTargetWho = null;
            this.mTarget = fragment;
        } else {
            this.mTargetWho = fragment.mWho;
            this.mTarget = null;
        }
        this.mTargetRequestCode = i;
    }

    public void startActivity(@SuppressLint({"UnknownNullness"}) Intent intent, Bundle bundle) {
        AbstractC2010<?> abstractC2010 = this.mHost;
        if (abstractC2010 == null) {
            throw new IllegalStateException(C2803.m4877("Fragment ", this, " not attached to Activity"));
        }
        if (abstractC2010 == null) {
            throw null;
        }
        C1850.m3650(abstractC2010.f6595, intent, bundle);
    }

    public void startPostponedEnterTransition() {
        if (this.mAnimationInfo == null || !ensureAnimationInfo().f654) {
            return;
        }
        if (this.mHost == null) {
            ensureAnimationInfo().f654 = false;
        } else if (Looper.myLooper() != this.mHost.f6596.getLooper()) {
            this.mHost.f6596.postAtFrontOfQueue(new RunnableC0085());
        } else {
            callStartTransitionListener();
        }
    }

    public String toString() {
        StringBuilder sb = new StringBuilder(128);
        sb.append(getClass().getSimpleName());
        sb.append("{");
        sb.append(Integer.toHexString(System.identityHashCode(this)));
        sb.append("}");
        sb.append(" (");
        sb.append(this.mWho);
        sb.append(")");
        if (this.mFragmentId != 0) {
            sb.append(" id=0x");
            sb.append(Integer.toHexString(this.mFragmentId));
        }
        if (this.mTag != null) {
            sb.append(" ");
            sb.append(this.mTag);
        }
        sb.append('}');
        return sb.toString();
    }
}
