package androidx.fragment.app;

import X.3i8;
import X.AdB;
import X.AnonymousClass058;
import X.AnonymousClass06W;
import X.AnonymousClass07S;
import X.AnonymousClass0A5;
import X.AnonymousClass0AA;
import X.AnonymousClass0AO;
import X.AnonymousClass0C0;
import X.AnonymousClass0CB;
import X.AnonymousClass0CD;
import X.AnonymousClass0CH;
import X.AnonymousClass0CZ;
import X.C025809w;
import X.C025909x;
import X.C026009y;
import X.C02670Af;
import X.C03130Bz;
import X.C28321Aw;
import X.C28461Bk;
import X.C28491Bn;
import X.C39401hK;
import X.Ol3;
import X.Ol5;
import android.animation.Animator;
import android.app.Activity;
import android.content.ComponentCallbacks;
import android.content.Context;
import android.content.Intent;
import android.content.IntentSender;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Bundle;
import android.os.Looper;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.AttributeSet;
import android.util.SparseArray;
import android.view.ContextMenu;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import androidx.lifecycle.LiveData;
import com.bytedance.covode.number.Covode;
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.lang.reflect.InvocationTargetException;

public class Fragment implements ComponentCallbacks, View.OnCreateContextMenuListener, AnonymousClass0C0, AnonymousClass0CH {
    public static final Object USE_DEFAULT_TRANSITION = new Object();
    public static final AnonymousClass058<String, Class<?>> sClassMap = new AnonymousClass058<>();
    public boolean mAdded;
    public C025809w mAnimationInfo;
    public Bundle mArguments;
    public int mBackStackNesting;
    public boolean mCalled;
    public k mChildFragmentManager;
    public AnonymousClass0AO mChildNonConfig;
    public ViewGroup mContainer;
    public int mContainerId;
    public boolean mDeferStart;
    public boolean mDetached;
    public int mFragmentId;
    public k mFragmentManager;
    public boolean mFromLayout;
    public boolean mHasMenu;
    public boolean mHidden;
    public boolean mHiddenChanged;
    public C28321Aw mHost;
    public boolean mInLayout;
    public int mIndex = -1;
    public View mInnerView;
    public boolean mIsCreated;
    public boolean mIsNewlyAdded;
    public LayoutInflater mLayoutInflater;
    public C28461Bk mLifecycleRegistry = new C28461Bk(this);
    public boolean mMenuVisible = true;
    public Fragment mParentFragment;
    public boolean mPerformedCreateView;
    public float mPostponedAlpha;
    public boolean mRemoving;
    public boolean mRestored;
    public boolean mRetainInstance;
    public boolean mRetaining;
    public Bundle mSavedFragmentState;
    public Boolean mSavedUserVisibleHint;
    public SparseArray<Parcelable> mSavedViewState;
    public int mState;
    public String mTag;
    public Fragment mTarget;
    public int mTargetIndex = -1;
    public int mTargetRequestCode;
    public boolean mUserVisibleHint = true;
    public View mView;
    public AnonymousClass0CH mViewLifecycleOwner;
    public C28491Bn<AnonymousClass0CH> mViewLifecycleOwnerLiveData = new C28491Bn<>();
    public C28461Bk mViewLifecycleRegistry;
    public C03130Bz mViewModelStore;
    public String mWho;

    public void onActivityResult(int i, int i2, Intent intent) {
    }

    public void onAttachFragment(Fragment fragment) {
    }

    public boolean onContextItemSelected(MenuItem menuItem) {
        return false;
    }

    public Animation onCreateAnimation(int i, boolean z, int i2) {
        return null;
    }

    public Animator onCreateAnimator(int i, boolean z, int i2) {
        return null;
    }

    public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {
    }

    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        return null;
    }

    public void onDestroyOptionsMenu() {
    }

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

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

    public void onHiddenChanged(boolean z) {
    }

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

    public void onMultiWindowModeChanged(boolean z) {
    }

    public boolean onOptionsItemSelected(MenuItem menuItem) {
        return false;
    }

    public void onOptionsMenuClosed(Menu menu) {
    }

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

    public void onPictureInPictureModeChanged(boolean z) {
    }

    public void onPrepareOptionsMenu(Menu menu) {
    }

    public void onRequestPermissionsResult(int i, String[] strArr, int[] iArr) {
    }

    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 setUserVisibleHint(boolean z) {
        androidx_fragment_app_Fragment_com_bytedance_scalpel_scene_lancet_common_FragmentManagerLancet_setUserVisibleHint(this, z);
    }

    public void startActivityForResult(Intent intent, int i) {
        androidx_fragment_app_Fragment_com_ss_android_ugc_tiktok_security_lancet_ContextLancet_startActivityForResultInFragment(this, intent, i);
    }

    public void startActivityForResult(Intent intent, int i, Bundle bundle) {
        androidx_fragment_app_Fragment_com_ss_android_ugc_tiktok_security_lancet_ContextLancet_startActivityForResultInFragmentX(this, intent, i, bundle);
    }

    public final Bundle getArguments() {
        return this.mArguments;
    }

    public final AnonymousClass0AA getFragmentManager() {
        return this.mFragmentManager;
    }

    public final int getId() {
        return this.mFragmentId;
    }

    public AnonymousClass0CD getLifecycle() {
        return this.mLifecycleRegistry;
    }

    public final Fragment getParentFragment() {
        return this.mParentFragment;
    }

    public final boolean getRetainInstance() {
        return this.mRetainInstance;
    }

    public final String getTag() {
        return this.mTag;
    }

    public final Fragment getTargetFragment() {
        return this.mTarget;
    }

    public final int getTargetRequestCode() {
        return this.mTargetRequestCode;
    }

    public boolean getUserVisibleHint() {
        return this.mUserVisibleHint;
    }

    public View getView() {
        return this.mView;
    }

    public LiveData<AnonymousClass0CH> getViewLifecycleOwnerLiveData() {
        return this.mViewLifecycleOwnerLiveData;
    }

    public final boolean hasOptionsMenu() {
        return this.mHasMenu;
    }

    public final boolean isDetached() {
        return this.mDetached;
    }

    public final boolean isHidden() {
        return this.mHidden;
    }

    public final boolean isInLayout() {
        return this.mInLayout;
    }

    public final boolean isMenuVisible() {
        return this.mMenuVisible;
    }

    public final boolean isRemoving() {
        return this.mRemoving;
    }

    public AnonymousClass0AA peekChildFragmentManager() {
        return this.mChildFragmentManager;
    }

    public AnonymousClass0CZ getLoaderManager() {
        return AnonymousClass0CZ.LIZ(this);
    }

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

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

    public void noteStateNotSaved() {
        k kVar = this.mChildFragmentManager;
        if (kVar != null) {
            kVar.LJIIJ();
        }
    }

    public void postponeEnterTransition() {
        ensureAnimationInfo().LJIILLIIL = true;
    }

    public static class SavedState implements Parcelable {
        public static final Parcelable.Creator<SavedState> CREATOR = new Parcelable.ClassLoaderCreator<SavedState>() {
            static {
                Covode.recordClassIndex(1038);
            }

            public final /* bridge */ /* synthetic */ Object[] newArray(int i) {
                return new SavedState[i];
            }

            public final /* synthetic */ Object createFromParcel(Parcel parcel) {
                return new SavedState(parcel, (ClassLoader) null);
            }

            public final /* synthetic */ Object createFromParcel(Parcel parcel, ClassLoader classLoader) {
                return new SavedState(parcel, classLoader);
            }
        };
        public final Bundle LIZ;

        public int describeContents() {
            return 0;
        }

        static {
            Covode.recordClassIndex(1037);
        }

        public SavedState(Bundle bundle) {
            this.LIZ = bundle;
        }

        public void writeToParcel(Parcel parcel, int i) {
            parcel.writeBundle(this.LIZ);
        }

        public SavedState(Parcel parcel, ClassLoader classLoader) {
            Bundle readBundle = parcel.readBundle();
            this.LIZ = readBundle;
            if (classLoader != null && readBundle != null) {
                readBundle.setClassLoader(classLoader);
            }
        }
    }

    private C025809w ensureAnimationInfo() {
        if (this.mAnimationInfo == null) {
            this.mAnimationInfo = new C025809w();
        }
        return this.mAnimationInfo;
    }

    public final C39401hK getActivity() {
        C28321Aw r0 = this.mHost;
        if (r0 == null) {
            return null;
        }
        return (C39401hK) r0.LIZIZ;
    }

    public View getAnimatingAway() {
        C025809w r0 = this.mAnimationInfo;
        if (r0 == null) {
            return null;
        }
        return r0.LIZ;
    }

    public Animator getAnimator() {
        C025809w r0 = this.mAnimationInfo;
        if (r0 == null) {
            return null;
        }
        return r0.LIZIZ;
    }

    public Context getContext() {
        C28321Aw r0 = this.mHost;
        if (r0 == null) {
            return null;
        }
        return r0.LIZJ;
    }

    public Object getEnterTransition() {
        C025809w r0 = this.mAnimationInfo;
        if (r0 == null) {
            return null;
        }
        return r0.LJI;
    }

    public AnonymousClass06W getEnterTransitionCallback() {
        C025809w r0 = this.mAnimationInfo;
        if (r0 == null) {
            return null;
        }
        return r0.LJIILJJIL;
    }

    public Object getExitTransition() {
        C025809w r0 = this.mAnimationInfo;
        if (r0 == null) {
            return null;
        }
        return r0.LJIIIIZZ;
    }

    public AnonymousClass06W getExitTransitionCallback() {
        C025809w r0 = this.mAnimationInfo;
        if (r0 == null) {
            return null;
        }
        return r0.LJIILL;
    }

    public final Object getHost() {
        C28321Aw r0 = this.mHost;
        if (r0 == null) {
            return null;
        }
        return r0.LJI();
    }

    public final LayoutInflater getLayoutInflater() {
        LayoutInflater layoutInflater = this.mLayoutInflater;
        if (layoutInflater == null) {
            return performGetLayoutInflater((Bundle) null);
        }
        return layoutInflater;
    }

    public int getNextAnim() {
        C025809w r0 = this.mAnimationInfo;
        if (r0 == null) {
            return 0;
        }
        return r0.LIZLLL;
    }

    public int getNextTransition() {
        C025809w r0 = this.mAnimationInfo;
        if (r0 == null) {
            return 0;
        }
        return r0.LJ;
    }

    public int getNextTransitionStyle() {
        C025809w r0 = this.mAnimationInfo;
        if (r0 == null) {
            return 0;
        }
        return r0.LJFF;
    }

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

    public Object getSharedElementEnterTransition() {
        C025809w r0 = this.mAnimationInfo;
        if (r0 == null) {
            return null;
        }
        return r0.LJIIJ;
    }

    public int getStateAfterAnimating() {
        C025809w r0 = this.mAnimationInfo;
        if (r0 == null) {
            return 0;
        }
        return r0.LIZJ;
    }

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

    public final boolean isAdded() {
        if (this.mHost == null || !this.mAdded) {
            return false;
        }
        return true;
    }

    public boolean isHideReplaced() {
        C025809w r0 = this.mAnimationInfo;
        if (r0 == null) {
            return false;
        }
        return r0.LJIJ;
    }

    public boolean isPostponed() {
        C025809w r0 = this.mAnimationInfo;
        if (r0 == null) {
            return false;
        }
        return r0.LJIILLIIL;
    }

    public final boolean isResumed() {
        if (this.mState >= 4) {
            return true;
        }
        return false;
    }

    public final boolean isStateSaved() {
        k kVar = this.mFragmentManager;
        if (kVar == null) {
            return false;
        }
        return kVar.LJII();
    }

    public void performLowMemory() {
        onLowMemory();
        k kVar = this.mChildFragmentManager;
        if (kVar != null) {
            kVar.LJIIZILJ();
        }
    }

    static {
        Covode.recordClassIndex(1033);
    }

    public void callStartTransitionListener() {
        C025809w r1 = this.mAnimationInfo;
        if (r1 != null) {
            r1.LJIILLIIL = false;
            C026009y r12 = this.mAnimationInfo.LJIIZILJ;
            this.mAnimationInfo.LJIIZILJ = null;
            if (r12 != null) {
                r12.LIZ();
            }
        }
    }

    public boolean getAllowEnterTransitionOverlap() {
        C025809w r0 = this.mAnimationInfo;
        if (r0 == null || r0.LJIILIIL == null) {
            return true;
        }
        return this.mAnimationInfo.LJIILIIL.booleanValue();
    }

    public boolean getAllowReturnTransitionOverlap() {
        C025809w r0 = this.mAnimationInfo;
        if (r0 == null || r0.LJIIL == null) {
            return true;
        }
        return this.mAnimationInfo.LJIIL.booleanValue();
    }

    public Object getReenterTransition() {
        C025809w r0 = this.mAnimationInfo;
        if (r0 == null) {
            return null;
        }
        if (r0.LJIIIZ == USE_DEFAULT_TRANSITION) {
            return getExitTransition();
        }
        return this.mAnimationInfo.LJIIIZ;
    }

    public Object getReturnTransition() {
        C025809w r0 = this.mAnimationInfo;
        if (r0 == null) {
            return null;
        }
        if (r0.LJII == USE_DEFAULT_TRANSITION) {
            return getEnterTransition();
        }
        return this.mAnimationInfo.LJII;
    }

    public Object getSharedElementReturnTransition() {
        C025809w r0 = this.mAnimationInfo;
        if (r0 == null) {
            return null;
        }
        if (r0.LJIIJJI == USE_DEFAULT_TRANSITION) {
            return getSharedElementEnterTransition();
        }
        return this.mAnimationInfo.LJIIJJI;
    }

    public C03130Bz getViewModelStore() {
        if (getContext() != null) {
            if (this.mViewModelStore == null) {
                this.mViewModelStore = new C03130Bz();
            }
            return this.mViewModelStore;
        }
        throw new IllegalStateException("Can't access ViewModels from detached fragment");
    }

    public void instantiateChildFragmentManager() {
        if (this.mHost != null) {
            k kVar = new k();
            this.mChildFragmentManager = kVar;
            kVar.LIZ(this.mHost, (AnonymousClass0A5) new AnonymousClass0A5() {
                static {
                    Covode.recordClassIndex(1035);
                }

                public final boolean LIZ() {
                    if (Fragment.this.mView != null) {
                        return true;
                    }
                    return false;
                }

                public final View LIZ(int i) {
                    if (Fragment.this.mView != null) {
                        return Fragment.this.mView.findViewById(i);
                    }
                    throw new IllegalStateException("Fragment does not have a view");
                }

                public final Fragment LIZ(Context context, String str, Bundle bundle) {
                    return Fragment.this.mHost.LIZ(context, str, bundle);
                }
            }, this);
            return;
        }
        throw new IllegalStateException("Fragment has not been attached yet.");
    }

    public void onDestroy() {
        boolean z = true;
        this.mCalled = true;
        C39401hK activity = getActivity();
        if (activity == null || !activity.isChangingConfigurations()) {
            z = false;
        }
        C03130Bz r0 = this.mViewModelStore;
        if (r0 != null && !z) {
            C03130Bz.LIZIZ(r0);
        }
    }

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

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

    public final AnonymousClass0AA requireFragmentManager() {
        AnonymousClass0AA fragmentManager = getFragmentManager();
        if (fragmentManager != null) {
            return fragmentManager;
        }
        throw new IllegalStateException("Fragment " + this + " not associated with a fragment manager.");
    }

    public final Object requireHost() {
        Object host = getHost();
        if (host != null) {
            return host;
        }
        throw new IllegalStateException("Fragment " + this + " not attached to a host.");
    }

    public final AnonymousClass0AA getChildFragmentManager() {
        if (this.mChildFragmentManager == null) {
            instantiateChildFragmentManager();
            int i = this.mState;
            if (i >= 4) {
                this.mChildFragmentManager.LJIILJJIL();
            } else if (i >= 3) {
                this.mChildFragmentManager.LJIILIIL();
            } else if (i >= 2) {
                this.mChildFragmentManager.LJIIL();
            } else if (i > 0) {
                this.mChildFragmentManager.LJIIJJI();
            }
        }
        return this.mChildFragmentManager;
    }

    public void initState() {
        this.mIndex = -1;
        this.mWho = null;
        this.mAdded = false;
        this.mRemoving = false;
        this.mFromLayout = false;
        this.mInLayout = false;
        this.mRestored = false;
        this.mBackStackNesting = 0;
        this.mFragmentManager = null;
        this.mChildFragmentManager = null;
        this.mHost = null;
        this.mFragmentId = 0;
        this.mContainerId = 0;
        this.mTag = null;
        this.mHidden = false;
        this.mDetached = false;
        this.mRetaining = false;
    }

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

    public void performDestroy() {
        this.mLifecycleRegistry.LIZ(AnonymousClass0CB.ON_DESTROY);
        k kVar = this.mChildFragmentManager;
        if (kVar != null) {
            kVar.LJIILLIIL();
        }
        this.mState = 0;
        this.mCalled = false;
        this.mIsCreated = false;
        onDestroy();
        if (this.mCalled) {
            this.mChildFragmentManager = null;
            return;
        }
        throw new C02670Af("Fragment " + this + " did not call through to super.onDestroy()");
    }

    public void performPause() {
        if (this.mView != null) {
            this.mViewLifecycleRegistry.LIZ(AnonymousClass0CB.ON_PAUSE);
        }
        this.mLifecycleRegistry.LIZ(AnonymousClass0CB.ON_PAUSE);
        k kVar = this.mChildFragmentManager;
        if (kVar != null) {
            kVar.LIZLLL(3);
        }
        this.mState = 3;
        this.mCalled = false;
        onPause();
        if (!this.mCalled) {
            throw new C02670Af("Fragment " + this + " did not call through to super.onPause()");
        }
    }

    public void performStop() {
        if (this.mView != null) {
            this.mViewLifecycleRegistry.LIZ(AnonymousClass0CB.ON_STOP);
        }
        this.mLifecycleRegistry.LIZ(AnonymousClass0CB.ON_STOP);
        k kVar = this.mChildFragmentManager;
        if (kVar != null) {
            kVar.LJIILL();
        }
        this.mState = 2;
        this.mCalled = false;
        onStop();
        if (!this.mCalled) {
            throw new C02670Af("Fragment " + this + " did not call through to super.onStop()");
        }
    }

    public void startPostponedEnterTransition() {
        k kVar = this.mFragmentManager;
        if (kVar == null || kVar.LJIIL == null) {
            ensureAnimationInfo().LJIILLIIL = false;
        } else if (Looper.myLooper() != this.mFragmentManager.LJIIL.LIZLLL.getLooper()) {
            this.mFragmentManager.LJIIL.LIZLLL.postAtFrontOfQueue(new Runnable() {
                static {
                    Covode.recordClassIndex(1034);
                }

                public final void run() {
                    Fragment.this.callStartTransitionListener();
                }
            });
        } else {
            callStartTransitionListener();
        }
    }

    public void performDestroyView() {
        if (this.mView != null) {
            this.mViewLifecycleRegistry.LIZ(AnonymousClass0CB.ON_DESTROY);
        }
        k kVar = this.mChildFragmentManager;
        if (kVar != null) {
            kVar.LIZLLL(1);
        }
        this.mState = 1;
        this.mCalled = false;
        onDestroyView();
        if (this.mCalled) {
            AnonymousClass0CZ.LIZ(this).LIZ();
            this.mPerformedCreateView = false;
            return;
        }
        throw new C02670Af("Fragment " + this + " did not call through to super.onDestroyView()");
    }

    public void performDetach() {
        this.mCalled = false;
        onDetach();
        this.mLayoutInflater = null;
        if (this.mCalled) {
            k kVar = this.mChildFragmentManager;
            if (kVar == null) {
                return;
            }
            if (this.mRetaining) {
                kVar.LJIILLIIL();
                this.mChildFragmentManager = null;
                return;
            }
            throw new IllegalStateException("Child FragmentManager of " + this + " was not  destroyed and this fragment is not retaining instance");
        }
        throw new C02670Af("Fragment " + this + " did not call through to super.onDetach()");
    }

    public void performResume() {
        k kVar = this.mChildFragmentManager;
        if (kVar != null) {
            kVar.LJIIJ();
            k.LIZ(this.mChildFragmentManager);
        }
        this.mState = 4;
        this.mCalled = false;
        onResume();
        if (this.mCalled) {
            k kVar2 = this.mChildFragmentManager;
            if (kVar2 != null) {
                kVar2.LJIILJJIL();
                k.LIZ(this.mChildFragmentManager);
            }
            this.mLifecycleRegistry.LIZ(AnonymousClass0CB.ON_RESUME);
            if (this.mView != null) {
                this.mViewLifecycleRegistry.LIZ(AnonymousClass0CB.ON_RESUME);
                return;
            }
            return;
        }
        throw new C02670Af("Fragment " + this + " did not call through to super.onResume()");
    }

    public void performStart() {
        k kVar = this.mChildFragmentManager;
        if (kVar != null) {
            kVar.LJIIJ();
            k.LIZ(this.mChildFragmentManager);
        }
        this.mState = 3;
        this.mCalled = false;
        onStart();
        if (this.mCalled) {
            k kVar2 = this.mChildFragmentManager;
            if (kVar2 != null) {
                kVar2.LJIILIIL();
            }
            this.mLifecycleRegistry.LIZ(AnonymousClass0CB.ON_START);
            if (this.mView != null) {
                this.mViewLifecycleRegistry.LIZ(AnonymousClass0CB.ON_START);
                return;
            }
            return;
        }
        throw new C02670Af("Fragment " + this + " did not call through to super.onStart()");
    }

    public String toString() {
        StringBuilder sb = new StringBuilder(128);
        AnonymousClass07S.LIZ(this, sb);
        if (this.mIndex >= 0) {
            sb.append(" #");
            sb.append(this.mIndex);
        }
        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();
    }

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

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

    public void onConfigurationChanged(Configuration configuration) {
        this.mCalled = true;
    }

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

    public void registerForContextMenu(View view) {
        view.setOnCreateContextMenuListener(this);
    }

    public void setRetainInstance(boolean z) {
        this.mRetainInstance = z;
    }

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

    public LayoutInflater onGetLayoutInflater(Bundle bundle) {
        return getLayoutInflater(bundle);
    }

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

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

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

    public void setEnterSharedElementCallback(AnonymousClass06W r2) {
        ensureAnimationInfo().LJIILJJIL = r2;
    }

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

    public void setExitSharedElementCallback(AnonymousClass06W r2) {
        ensureAnimationInfo().LJIILL = r2;
    }

    public void setExitTransition(Object obj) {
        ensureAnimationInfo().LJIIIIZZ = obj;
    }

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

    public void setReenterTransition(Object obj) {
        ensureAnimationInfo().LJIIIZ = obj;
    }

    public void setReturnTransition(Object obj) {
        ensureAnimationInfo().LJII = obj;
    }

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

    public void setSharedElementReturnTransition(Object obj) {
        ensureAnimationInfo().LJIIJJI = obj;
    }

    public void setStateAfterAnimating(int i) {
        ensureAnimationInfo().LIZJ = i;
    }

    public void startActivity(Intent intent) {
        startActivity(intent, (Bundle) null);
    }

    public void unregisterForContextMenu(View view) {
        view.setOnCreateContextMenuListener((View.OnCreateContextMenuListener) null);
    }

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

    public final CharSequence getText(int i) {
        return getResources().getText(i);
    }

    public void performConfigurationChanged(Configuration configuration) {
        onConfigurationChanged(configuration);
        k kVar = this.mChildFragmentManager;
        if (kVar != null) {
            kVar.LIZ(configuration);
        }
    }

    public void performMultiWindowModeChanged(boolean z) {
        onMultiWindowModeChanged(z);
        k kVar = this.mChildFragmentManager;
        if (kVar != null) {
            kVar.LIZ(z);
        }
    }

    public void performPictureInPictureModeChanged(boolean z) {
        onPictureInPictureModeChanged(z);
        k kVar = this.mChildFragmentManager;
        if (kVar != null) {
            kVar.LIZIZ(z);
        }
    }

    public void setAllowEnterTransitionOverlap(boolean z) {
        ensureAnimationInfo().LJIILIIL = Boolean.valueOf(z);
    }

    public void setAllowReturnTransitionOverlap(boolean z) {
        ensureAnimationInfo().LJIIL = Boolean.valueOf(z);
    }

    public void setNextAnim(int i) {
        if (this.mAnimationInfo != null || i != 0) {
            ensureAnimationInfo().LIZLLL = i;
        }
    }

    public boolean shouldShowRequestPermissionRationale(String str) {
        C28321Aw r0 = this.mHost;
        if (r0 != null) {
            return r0.LIZ(str);
        }
        return false;
    }

    public Fragment findFragmentByWho(String str) {
        if (str.equals(this.mWho)) {
            return this;
        }
        k kVar = this.mChildFragmentManager;
        if (kVar != null) {
            return kVar.LIZIZ(str);
        }
        return null;
    }

    public LayoutInflater getLayoutInflater(Bundle bundle) {
        C28321Aw r0 = this.mHost;
        if (r0 != null) {
            LayoutInflater LIZJ = r0.LIZJ();
            getChildFragmentManager();
            LIZJ.setFactory2(this.mChildFragmentManager);
            return LIZJ;
        }
        throw new IllegalStateException("onGetLayoutInflater() cannot be executed until the Fragment is attached to the FragmentManager.");
    }

    public void onAttach(Context context) {
        Activity activity;
        this.mCalled = true;
        C28321Aw r0 = this.mHost;
        if (r0 != null && (activity = r0.LIZIZ) != null) {
            this.mCalled = false;
            onAttach(activity);
        }
    }

    public void onCreate(Bundle bundle) {
        this.mCalled = true;
        restoreChildFragmentState(bundle);
        k kVar = this.mChildFragmentManager;
        if (kVar != null && kVar.LJIIJJI <= 0) {
            this.mChildFragmentManager.LJIIJJI();
        }
    }

    public boolean performContextItemSelected(MenuItem menuItem) {
        if (this.mHidden) {
            return false;
        }
        if (onContextItemSelected(menuItem)) {
            return true;
        }
        k kVar = this.mChildFragmentManager;
        if (kVar == null || !kVar.LIZIZ(menuItem)) {
            return false;
        }
        return true;
    }

    public void performOptionsMenuClosed(Menu menu) {
        if (!this.mHidden) {
            if (this.mHasMenu && this.mMenuVisible) {
                onOptionsMenuClosed(menu);
            }
            k kVar = this.mChildFragmentManager;
            if (kVar != null) {
                kVar.LIZIZ(menu);
            }
        }
    }

    public boolean performPrepareOptionsMenu(Menu menu) {
        boolean z = false;
        if (this.mHidden) {
            return false;
        }
        if (this.mHasMenu && this.mMenuVisible) {
            onPrepareOptionsMenu(menu);
            z = true;
        }
        k kVar = this.mChildFragmentManager;
        if (kVar != null) {
            return z | kVar.LIZ(menu);
        }
        return z;
    }

    public void performSaveInstanceState(Bundle bundle) {
        Parcelable LJIIIZ;
        onSaveInstanceState(bundle);
        k kVar = this.mChildFragmentManager;
        if (kVar != null && (LJIIIZ = kVar.LJIIIZ()) != null) {
            bundle.putParcelable("android:support:fragments", LJIIIZ);
        }
    }

    public void setArguments(Bundle bundle) {
        if (this.mIndex < 0 || !isStateSaved()) {
            this.mArguments = bundle;
            return;
        }
        throw new IllegalStateException("Fragment already active and state has been saved");
    }

    public void setHasOptionsMenu(boolean z) {
        if (this.mHasMenu != z) {
            this.mHasMenu = z;
            if (isAdded() && !isHidden()) {
                this.mHost.LIZLLL();
            }
        }
    }

    public void setInitialSavedState(SavedState savedState) {
        Bundle bundle;
        if (this.mIndex < 0) {
            if (savedState == null || savedState.LIZ == null) {
                bundle = null;
            } else {
                bundle = savedState.LIZ;
            }
            this.mSavedFragmentState = bundle;
            return;
        }
        throw new IllegalStateException("Fragment already active");
    }

    public void setMenuVisibility(boolean z) {
        if (this.mMenuVisible != z) {
            this.mMenuVisible = z;
            if (this.mHasMenu && isAdded() && !isHidden()) {
                this.mHost.LIZLLL();
            }
        }
    }

    public void androidx_fragment_app_Fragment__setUserVisibleHint$___twin___(boolean z) {
        boolean z2;
        if (!this.mUserVisibleHint && z && this.mState < 3 && this.mFragmentManager != null && isAdded() && this.mIsCreated) {
            this.mFragmentManager.LIZIZ(this);
        }
        this.mUserVisibleHint = z;
        if (this.mState >= 3 || z) {
            z2 = false;
        } else {
            z2 = true;
        }
        this.mDeferStart = z2;
        if (this.mSavedFragmentState != null) {
            this.mSavedUserVisibleHint = Boolean.valueOf(z);
        }
    }

    public void performActivityCreated(Bundle bundle) {
        k kVar = this.mChildFragmentManager;
        if (kVar != null) {
            kVar.LJIIJ();
        }
        this.mState = 2;
        this.mCalled = false;
        onActivityCreated(bundle);
        if (this.mCalled) {
            k kVar2 = this.mChildFragmentManager;
            if (kVar2 != null) {
                kVar2.LJIIL();
                return;
            }
            return;
        }
        throw new C02670Af("Fragment " + this + " did not call through to super.onActivityCreated()");
    }

    public void performCreate(Bundle bundle) {
        k kVar = this.mChildFragmentManager;
        if (kVar != null) {
            kVar.LJIIJ();
        }
        this.mState = 1;
        this.mCalled = false;
        onCreate(bundle);
        this.mIsCreated = true;
        if (this.mCalled) {
            this.mLifecycleRegistry.LIZ(AnonymousClass0CB.ON_CREATE);
            return;
        }
        throw new C02670Af("Fragment " + this + " did not call through to super.onCreate()");
    }

    public boolean performOptionsItemSelected(MenuItem menuItem) {
        if (this.mHidden) {
            return false;
        }
        if (this.mHasMenu && this.mMenuVisible && onOptionsItemSelected(menuItem)) {
            return true;
        }
        k kVar = this.mChildFragmentManager;
        if (kVar == null || !kVar.LIZ(menuItem)) {
            return false;
        }
        return true;
    }

    public void restoreChildFragmentState(Bundle bundle) {
        Parcelable parcelable;
        if (bundle != null && (parcelable = bundle.getParcelable("android:support:fragments")) != null) {
            if (this.mChildFragmentManager == null) {
                instantiateChildFragmentManager();
            }
            this.mChildFragmentManager.LIZ(parcelable, this.mChildNonConfig);
            this.mChildNonConfig = null;
            this.mChildFragmentManager.LJIIJJI();
        }
    }

    public final void restoreViewState(Bundle bundle) {
        SparseArray<Parcelable> sparseArray = this.mSavedViewState;
        if (sparseArray != null) {
            this.mInnerView.restoreHierarchyState(sparseArray);
            this.mSavedViewState = null;
        }
        this.mCalled = false;
        onViewStateRestored(bundle);
        if (!this.mCalled) {
            throw new C02670Af("Fragment " + this + " did not call through to super.onViewStateRestored()");
        } else if (this.mView != null) {
            this.mViewLifecycleRegistry.LIZ(AnonymousClass0CB.ON_CREATE);
        }
    }

    public void setOnStartEnterTransitionListener(C026009y r4) {
        ensureAnimationInfo();
        if (r4 != this.mAnimationInfo.LJIIZILJ) {
            if (r4 == null || this.mAnimationInfo.LJIIZILJ == null) {
                if (this.mAnimationInfo.LJIILLIIL) {
                    this.mAnimationInfo.LJIIZILJ = r4;
                }
                if (r4 != null) {
                    r4.LIZIZ();
                    return;
                }
                return;
            }
            throw new IllegalStateException("Trying to set a replacement startPostponedEnterTransition on ".concat(String.valueOf(this)));
        }
    }

    public static Fragment instantiate(Context context, String str) {
        return instantiate(context, str, (Bundle) null);
    }

    public void androidx_fragment_app_Fragment__startActivityForResult$___twin___(Intent intent, int i) {
        startActivityForResult(intent, i, (Bundle) null);
    }

    public static void androidx_fragment_app_Fragment_com_bytedance_scalpel_scene_lancet_common_FragmentManagerLancet_setUserVisibleHint(Fragment fragment, boolean z) {
        fragment.androidx_fragment_app_Fragment__setUserVisibleHint$___twin___(z);
        if (Ol5.LIZ()) {
            Ol3.LIZ().execute(new AdB(z, fragment));
        }
    }

    public static boolean isSupportFragmentClass(Context context, String str) {
        try {
            AnonymousClass058<String, Class<?>> r2 = sClassMap;
            Class<?> cls = r2.get(str);
            if (cls == null) {
                cls = context.getClassLoader().loadClass(str);
                r2.put(str, cls);
            }
            return Fragment.class.isAssignableFrom(cls);
        } catch (ClassNotFoundException unused) {
            return false;
        }
    }

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

    public boolean performCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {
        boolean z = false;
        if (this.mHidden) {
            return false;
        }
        if (this.mHasMenu && this.mMenuVisible) {
            onCreateOptionsMenu(menu, menuInflater);
            z = true;
        }
        k kVar = this.mChildFragmentManager;
        if (kVar != null) {
            return z | kVar.LIZ(menu, menuInflater);
        }
        return z;
    }

    public void setNextTransition(int i, int i2) {
        if (this.mAnimationInfo != null || i != 0 || i2 != 0) {
            ensureAnimationInfo();
            this.mAnimationInfo.LJ = i;
            this.mAnimationInfo.LJFF = i2;
        }
    }

    public final void requestPermissions(String[] strArr, int i) {
        C28321Aw r0 = this.mHost;
        if (r0 != null) {
            r0.LIZ(this, strArr, i);
            return;
        }
        throw new IllegalStateException("Fragment " + this + " not attached to Activity");
    }

    public final void setIndex(int i, Fragment fragment) {
        this.mIndex = i;
        if (fragment != null) {
            this.mWho = fragment.mWho + ":" + this.mIndex;
            return;
        }
        this.mWho = "android:fragment:" + this.mIndex;
    }

    public void startActivity(Intent intent, Bundle bundle) {
        C28321Aw r1 = this.mHost;
        if (r1 != null) {
            r1.LIZ(this, intent, -1, bundle);
            return;
        }
        throw new IllegalStateException("Fragment " + this + " not attached to Activity");
    }

    public void setTargetFragment(Fragment fragment, int i) {
        AnonymousClass0AA r0;
        AnonymousClass0AA fragmentManager = getFragmentManager();
        if (fragment != null) {
            r0 = fragment.getFragmentManager();
        } else {
            r0 = null;
        }
        if (fragmentManager == null || r0 == null || fragmentManager == r0) {
            Fragment fragment2 = fragment;
            while (fragment2 != null) {
                if (fragment2 != this) {
                    fragment2 = fragment2.getTargetFragment();
                } else {
                    throw new IllegalArgumentException("Setting " + fragment + " as the target of " + this + " would create a target cycle");
                }
            }
            this.mTarget = fragment;
            this.mTargetRequestCode = i;
            return;
        }
        throw new IllegalArgumentException("Fragment " + fragment + " must share the same FragmentManager to be set as a target fragment");
    }

    public void onInflate(Activity activity, AttributeSet attributeSet, Bundle bundle) {
        this.mCalled = true;
    }

    public static void androidx_fragment_app_Fragment_com_ss_android_ugc_tiktok_security_lancet_ContextLancet_startActivityForResultInFragment(Fragment fragment, Intent intent, int i) {
        3i8.LIZ(intent, fragment);
        fragment.androidx_fragment_app_Fragment__startActivityForResult$___twin___(intent, i);
    }

    public void onCreateContextMenu(ContextMenu contextMenu, View view, ContextMenu.ContextMenuInfo contextMenuInfo) {
        getActivity().onCreateContextMenu(contextMenu, view, contextMenuInfo);
    }

    public void onInflate(Context context, AttributeSet attributeSet, Bundle bundle) {
        Activity activity;
        this.mCalled = true;
        C28321Aw r0 = this.mHost;
        if (r0 != null && (activity = r0.LIZIZ) != null) {
            this.mCalled = false;
            onInflate(activity, attributeSet, bundle);
        }
    }

    public void androidx_fragment_app_Fragment__startActivityForResult$___twin___(Intent intent, int i, Bundle bundle) {
        C28321Aw r0 = this.mHost;
        if (r0 != null) {
            r0.LIZ(this, intent, i, bundle);
            return;
        }
        throw new IllegalStateException("Fragment " + this + " not attached to Activity");
    }

    public void performCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        k kVar = this.mChildFragmentManager;
        if (kVar != null) {
            kVar.LJIIJ();
        }
        this.mPerformedCreateView = true;
        this.mViewLifecycleOwner = new AnonymousClass0CH() {
            static {
                Covode.recordClassIndex(1036);
            }

            public final AnonymousClass0CD getLifecycle() {
                if (Fragment.this.mViewLifecycleRegistry == null) {
                    Fragment.this.mViewLifecycleRegistry = new C28461Bk(Fragment.this.mViewLifecycleOwner);
                }
                return Fragment.this.mViewLifecycleRegistry;
            }
        };
        this.mViewLifecycleRegistry = null;
        View INVOKEVIRTUAL_androidx_fragment_app_Fragment_com_bytedance_provider_lancet_FragmentOnCreateViewLancet_proxyOnCreateView = INVOKEVIRTUAL_androidx_fragment_app_Fragment_com_bytedance_provider_lancet_FragmentOnCreateViewLancet_proxyOnCreateView(this, layoutInflater, viewGroup, bundle);
        this.mView = INVOKEVIRTUAL_androidx_fragment_app_Fragment_com_bytedance_provider_lancet_FragmentOnCreateViewLancet_proxyOnCreateView;
        if (INVOKEVIRTUAL_androidx_fragment_app_Fragment_com_bytedance_provider_lancet_FragmentOnCreateViewLancet_proxyOnCreateView != null) {
            this.mViewLifecycleOwner.getLifecycle();
            this.mViewLifecycleOwnerLiveData.setValue(this.mViewLifecycleOwner);
        } else if (this.mViewLifecycleRegistry == null) {
            this.mViewLifecycleOwner = null;
        } else {
            throw new IllegalStateException("Called getViewLifecycleOwner() but onCreateView() returned null");
        }
    }

    public static Fragment instantiate(Context context, String str, Bundle bundle) {
        try {
            AnonymousClass058<String, Class<?>> r2 = sClassMap;
            Class<?> cls = r2.get(str);
            if (cls == null) {
                cls = context.getClassLoader().loadClass(str);
                r2.put(str, cls);
            }
            Fragment fragment = (Fragment) cls.getConstructor(new Class[0]).newInstance(new Object[0]);
            if (bundle != null) {
                bundle.setClassLoader(fragment.getClass().getClassLoader());
                fragment.setArguments(bundle);
            }
            return fragment;
        } catch (ClassNotFoundException e) {
            throw new C025909x("Unable to instantiate fragment " + str + ": make sure class name exists, is public, and has an empty constructor that is public", e);
        } catch (InstantiationException e2) {
            throw new C025909x("Unable to instantiate fragment " + str + ": make sure class name exists, is public, and has an empty constructor that is public", e2);
        } catch (IllegalAccessException e3) {
            throw new C025909x("Unable to instantiate fragment " + str + ": make sure class name exists, is public, and has an empty constructor that is public", e3);
        } catch (NoSuchMethodException e4) {
            throw new C025909x("Unable to instantiate fragment " + str + ": could not find Fragment constructor", e4);
        } catch (InvocationTargetException e5) {
            throw new C025909x("Unable to instantiate fragment " + str + ": calling Fragment constructor caused an exception", e5);
        }
    }

    public static void androidx_fragment_app_Fragment_com_ss_android_ugc_tiktok_security_lancet_ContextLancet_startActivityForResultInFragmentX(Fragment fragment, Intent intent, int i, Bundle bundle) {
        3i8.LIZ(intent, fragment);
        fragment.androidx_fragment_app_Fragment__startActivityForResult$___twin___(intent, i, bundle);
    }

    public static View INVOKEVIRTUAL_androidx_fragment_app_Fragment_com_bytedance_provider_lancet_FragmentOnCreateViewLancet_proxyOnCreateView(Fragment fragment, LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        View onCreateView = fragment.onCreateView(layoutInflater, viewGroup, bundle);
        if (onCreateView != null) {
            onCreateView.setTag(2131363634, fragment);
        }
        return onCreateView;
    }

    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(" mIndex=");
        printWriter.print(this.mIndex);
        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(this.mHasMenu);
        printWriter.print(str);
        printWriter.print("mRetainInstance=");
        printWriter.print(this.mRetainInstance);
        printWriter.print(" mRetaining=");
        printWriter.print(this.mRetaining);
        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);
        }
        if (this.mTarget != null) {
            printWriter.print(str);
            printWriter.print("mTarget=");
            printWriter.print(this.mTarget);
            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 (this.mInnerView != null) {
            printWriter.print(str);
            printWriter.print("mInnerView=");
            printWriter.println(this.mView);
        }
        if (getAnimatingAway() != null) {
            printWriter.print(str);
            printWriter.print("mAnimatingAway=");
            printWriter.println(getAnimatingAway());
            printWriter.print(str);
            printWriter.print("mStateAfterAnimating=");
            printWriter.println(getStateAfterAnimating());
        }
        if (getContext() != null) {
            AnonymousClass0CZ.LIZ(this).LIZ(str, fileDescriptor, printWriter, strArr);
        }
        if (this.mChildFragmentManager != null) {
            printWriter.print(str);
            printWriter.println("Child " + this.mChildFragmentManager + ":");
            k kVar = this.mChildFragmentManager;
            kVar.LIZ(str + "  ", fileDescriptor, printWriter, strArr);
        }
    }

    public void startIntentSenderForResult(IntentSender intentSender, int i, Intent intent, int i2, int i3, int i4, Bundle bundle) {
        C28321Aw r0 = this.mHost;
        if (r0 != null) {
            IntentSender intentSender2 = intentSender;
            r0.LIZ(this, intentSender2, i, intent, i2, i3, i4, bundle);
            return;
        }
        throw new IllegalStateException("Fragment " + this + " not attached to Activity");
    }
}
