package ῲ.Ԕ.K;

import android.animation.Animator;
import android.animation.AnimatorInflater;
import android.animation.AnimatorListenerAdapter;
import android.app.Activity;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.TypedArray;
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.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.AnimationSet;
import android.view.animation.AnimationUtils;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.Interpolator;
import android.view.animation.ScaleAnimation;
import android.view.animation.Transformation;
import androidx.activity.OnBackPressedDispatcher;
import androidx.fragment.app.BackStackState;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManagerState;
import androidx.fragment.app.FragmentState;
import androidx.lifecycle.Lifecycle;
import com.facebook.applinks.FacebookAppLinkResolver;
import com.facebook.internal.security.CertificateUtil;
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import ඓ.K.K.K.C1293;
import ῲ.Ԕ.K.AbstractC1531;
import ῲ.ؿ.AbstractC1567;
import ῲ.ؿ.AbstractC1570;
import ῲ.ؿ.AbstractC1574;
import ῲ.ؿ.AbstractC1580;
import ῲ.ؿ.AbstractC1586;
import ῲ.ؿ.C1568;
import ῲ.ᨨ.ᨨ.ViewTreeObserver$OnPreDrawListenerC1728;
import ῲ.ᨨ.㿎.C1867;
import ῲ.K.AbstractC2195;
import ῲ.K.AbstractC2196;
import ῲ.K.AbstractC2197;
import ῲ.㴹.C2274;
import K.K.K.ʬ.C2369;

/* renamed from: ῲ.Ԕ.K.㿎  reason: contains not printable characters */
/* compiled from: FragmentManagerImpl */
public final class LayoutInflater$Factory2C1545 extends AbstractC1531 implements LayoutInflater.Factory2 {

    /* renamed from: В  reason: contains not printable characters */
    public static final Interpolator f5646 = new DecelerateInterpolator(2.5f);

    /* renamed from: 㮝  reason: contains not printable characters */
    public static final Interpolator f5647 = new DecelerateInterpolator(1.5f);

    /* renamed from: Ԕ  reason: contains not printable characters */
    public ArrayList<Integer> f5648;

    /* renamed from: Ԛ  reason: contains not printable characters */
    public Fragment f5649;

    /* renamed from: ؿ  reason: contains not printable characters */
    public final CopyOnWriteArrayList<C1551> f5650 = new CopyOnWriteArrayList<>();

    /* renamed from: ݜ  reason: contains not printable characters */
    public AbstractC1513 f5651;

    /* renamed from: ඓ  reason: contains not printable characters */
    public boolean f5652;

    /* renamed from: ᆯ  reason: contains not printable characters */
    public SparseArray<Parcelable> f5653 = null;

    /* renamed from: ሽ  reason: contains not printable characters */
    public C1525 f5654;

    /* renamed from: ᑓ  reason: contains not printable characters */
    public boolean f5655;

    /* renamed from: ᑾ  reason: contains not printable characters */
    public Runnable f5656 = new RunnableC1550();

    /* renamed from: ᓆ  reason: contains not printable characters */
    public boolean f5657;

    /* renamed from: ᓣ  reason: contains not printable characters */
    public int f5658 = 0;

    /* renamed from: ᕣ  reason: contains not printable characters */
    public OnBackPressedDispatcher f5659;

    /* renamed from: ᝁ  reason: contains not printable characters */
    public Bundle f5660 = null;

    /* renamed from: ᨨ  reason: contains not printable characters */
    public ArrayList<C1535> f5661;

    /* renamed from: ⁱ  reason: contains not printable characters */
    public final ArrayList<Fragment> f5662 = new ArrayList<>();

    /* renamed from: ⶍ  reason: contains not printable characters */
    public ArrayList<C1548> f5663;

    /* renamed from: ゎ  reason: contains not printable characters */
    public boolean f5664;

    /* renamed from: ト  reason: contains not printable characters */
    public ArrayList<C1535> f5665;

    /* renamed from: 㑃  reason: contains not printable characters */
    public final AbstractC2196 f5666 = new C1552(false);

    /* renamed from: 㗗  reason: contains not printable characters */
    public ArrayList<AbstractC1531.AbstractC1532> f5667;

    /* renamed from: 㗽  reason: contains not printable characters */
    public AbstractC1542 f5668;

    /* renamed from: 㮔  reason: contains not printable characters */
    public ArrayList<Boolean> f5669;

    /* renamed from: 㳳  reason: contains not printable characters */
    public ArrayList<Fragment> f5670;

    /* renamed from: 㴪  reason: contains not printable characters */
    public boolean f5671;

    /* renamed from: 㴹  reason: contains not printable characters */
    public int f5672 = 0;

    /* renamed from: 㶋  reason: contains not printable characters */
    public boolean f5673;

    /* renamed from: 㸾  reason: contains not printable characters */
    public ArrayList<AbstractC1549> f5674;

    /* renamed from: 㿎  reason: contains not printable characters */
    public final HashMap<String, Fragment> f5675 = new HashMap<>();

    /* renamed from: 䀟  reason: contains not printable characters */
    public Fragment f5676;

    /* renamed from: 䁗  reason: contains not printable characters */
    public ArrayList<C1535> f5677;

    /* renamed from: 䃖  reason: contains not printable characters */
    public ArrayList<Fragment> f5678;

    /* renamed from: ῲ.Ԕ.K.㿎$ʬ  reason: contains not printable characters */
    /* compiled from: FragmentManagerImpl */
    public class C1546 extends AnimatorListenerAdapter {

        /* renamed from: ʬ  reason: contains not printable characters */
        public final /* synthetic */ Fragment f5679;

        /* renamed from: ῲ  reason: contains not printable characters */
        public final /* synthetic */ View f5680;

        /* renamed from: K  reason: contains not printable characters */
        public final /* synthetic */ ViewGroup f5681;

        public C1546(LayoutInflater$Factory2C1545 r1, ViewGroup viewGroup, View view, Fragment fragment) {
            this.f5681 = viewGroup;
            this.f5680 = view;
            this.f5679 = fragment;
        }

        public void onAnimationEnd(Animator animator) {
            this.f5681.endViewTransition(this.f5680);
            animator.removeListener(this);
            Fragment fragment = this.f5679;
            View view = fragment.mView;
            if (view != null && fragment.mHidden) {
                view.setVisibility(8);
            }
        }
    }

    /* renamed from: ῲ.Ԕ.K.㿎$ᕣ  reason: contains not printable characters */
    /* compiled from: FragmentManagerImpl */
    public static class C1548 implements Fragment.AbstractC0182 {

        /* renamed from: ʬ  reason: contains not printable characters */
        public int f5684;

        /* renamed from: ῲ  reason: contains not printable characters */
        public final C1535 f5685;

        /* renamed from: K  reason: contains not printable characters */
        public final boolean f5686;

        public C1548(C1535 k, boolean z) {
            this.f5686 = z;
            this.f5685 = k;
        }

        /* renamed from: K  reason: contains not printable characters */
        public void m4083() {
            boolean z = this.f5684 > 0;
            LayoutInflater$Factory2C1545 r3 = this.f5685.f5610;
            int size = r3.f5662.size();
            for (int i = 0; i < size; i++) {
                Fragment fragment = r3.f5662.get(i);
                fragment.setOnStartEnterTransitionListener(null);
                if (z && fragment.isPostponed()) {
                    fragment.startPostponedEnterTransition();
                }
            }
            C1535 k = this.f5685;
            k.f5610.m4044(k, this.f5686, !z, true);
        }
    }

    /* renamed from: ῲ.Ԕ.K.㿎$ᨨ  reason: contains not printable characters */
    /* compiled from: FragmentManagerImpl */
    public interface AbstractC1549 {
        /* renamed from: K  reason: contains not printable characters */
        boolean m4084(ArrayList<C1535> arrayList, ArrayList<Boolean> arrayList2);
    }

    /* renamed from: ῲ.Ԕ.K.㿎$ῲ  reason: contains not printable characters */
    /* compiled from: FragmentManagerImpl */
    public class RunnableC1550 implements Runnable {
        public RunnableC1550() {
        }

        public void run() {
            LayoutInflater$Factory2C1545.this.m3984();
        }
    }

    /* renamed from: ῲ.Ԕ.K.㿎$ⁱ  reason: contains not printable characters */
    /* compiled from: FragmentManagerImpl */
    public static final class C1551 {

        /* renamed from: ῲ  reason: contains not printable characters */
        public final boolean f5688;

        /* renamed from: K  reason: contains not printable characters */
        public final AbstractC1531.AbstractC1533 f5689;
    }

    /* renamed from: ῲ.Ԕ.K.㿎$K  reason: contains not printable characters */
    /* compiled from: FragmentManagerImpl */
    public class C1552 extends AbstractC2196 {
        public C1552(boolean z) {
            super(z);
        }
    }

    /* renamed from: ῲ.Ԕ.K.㿎$㳳  reason: contains not printable characters */
    /* compiled from: FragmentManagerImpl */
    public class C1553 implements AbstractC1549 {

        /* renamed from: ʬ  reason: contains not printable characters */
        public final int f5691;

        /* renamed from: ῲ  reason: contains not printable characters */
        public final int f5692;

        /* renamed from: K  reason: contains not printable characters */
        public final String f5693;

        public C1553(String str, int i, int i2) {
            this.f5693 = str;
            this.f5692 = i;
            this.f5691 = i2;
        }

        @Override // ῲ.Ԕ.K.LayoutInflater$Factory2C1545.AbstractC1549
        /* renamed from: K  reason: contains not printable characters */
        public boolean m4085(ArrayList<C1535> arrayList, ArrayList<Boolean> arrayList2) {
            Fragment fragment = LayoutInflater$Factory2C1545.this.f5649;
            if (fragment == null || this.f5692 >= 0 || this.f5693 != null || !fragment.getChildFragmentManager().m3912()) {
                return LayoutInflater$Factory2C1545.this.m4051(arrayList, arrayList2, this.f5693, this.f5692, this.f5691);
            }
            return false;
        }
    }

    /* renamed from: ῲ.Ԕ.K.㿎$㸾  reason: contains not printable characters */
    /* compiled from: FragmentManagerImpl */
    public class C1555 extends C1522 {
        public C1555() {
        }

        @Override // ῲ.Ԕ.K.C1522
        /* renamed from: K  reason: contains not printable characters */
        public Fragment m4086(ClassLoader classLoader, String str) {
            AbstractC1542 r3 = LayoutInflater$Factory2C1545.this.f5668;
            return r3.m3856(r3.f5638, str, null);
        }
    }

    /* renamed from: ῲ.Ԕ.K.㿎$㿎  reason: contains not printable characters */
    /* compiled from: FragmentManagerImpl */
    public static class C1556 {

        /* renamed from: K  reason: contains not printable characters */
        public static final int[] f5701 = {16842755, 16842960, 16842961};
    }

    /* renamed from: ඓ  reason: contains not printable characters */
    public static int m3972(int i) {
        if (i == 4097) {
            return 8194;
        }
        if (i != 4099) {
            return i != 8194 ? 0 : 4097;
        }
        return 4099;
    }

    @Override // ῲ.Ԕ.K.AbstractC1531
    public void addOnBackStackChangedListener(AbstractC1531.AbstractC1532 r2) {
        if (this.f5667 == null) {
            this.f5667 = new ArrayList<>();
        }
        this.f5667.add(r2);
    }

    public View onCreateView(View view, String str, Context context, AttributeSet attributeSet) {
        Fragment fragment;
        Fragment fragment2 = null;
        if (!"fragment".equals(str)) {
            return null;
        }
        String attributeValue = attributeSet.getAttributeValue(null, FacebookAppLinkResolver.APP_LINK_TARGET_CLASS_KEY);
        TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, C1556.f5701);
        int i = 0;
        if (attributeValue == null) {
            attributeValue = obtainStyledAttributes.getString(0);
        }
        int resourceId = obtainStyledAttributes.getResourceId(1, -1);
        String string = obtainStyledAttributes.getString(2);
        obtainStyledAttributes.recycle();
        if (attributeValue == null || !C1522.m3876(context.getClassLoader(), attributeValue)) {
            return null;
        }
        if (view != null) {
            i = view.getId();
        }
        if (i == -1 && resourceId == -1 && string == null) {
            throw new IllegalArgumentException(attributeSet.getPositionDescription() + ": Must specify unique android:id, android:tag, or have a parent with an id for " + attributeValue);
        }
        if (resourceId != -1) {
            fragment2 = m4005(resourceId);
        }
        if (fragment2 == null && string != null) {
            fragment2 = m4021(string);
        }
        if (fragment2 == null && i != -1) {
            fragment2 = m4005(i);
        }
        if (fragment2 == null) {
            Fragment r1 = m3974().m3878(context.getClassLoader(), attributeValue);
            r1.mFromLayout = true;
            r1.mFragmentId = resourceId != 0 ? resourceId : i;
            r1.mContainerId = i;
            r1.mTag = string;
            r1.mInLayout = true;
            r1.mFragmentManager = this;
            AbstractC1542 r2 = this.f5668;
            r1.mHost = r2;
            r1.onInflate(r2.f5638, attributeSet, r1.mSavedFragmentState);
            m4038(r1, true);
            fragment = r1;
        } else if (!fragment2.mInLayout) {
            fragment2.mInLayout = true;
            AbstractC1542 r12 = this.f5668;
            fragment2.mHost = r12;
            fragment2.onInflate(r12.f5638, attributeSet, fragment2.mSavedFragmentState);
            fragment = fragment2;
        } else {
            throw new IllegalArgumentException(attributeSet.getPositionDescription() + ": Duplicate id 0x" + Integer.toHexString(resourceId) + ", tag " + string + ", or parent id 0x" + Integer.toHexString(i) + " with another fragment for " + attributeValue);
        }
        if (this.f5658 >= 1 || !fragment.mFromLayout) {
            m4058(fragment);
        } else {
            m4033(fragment, 1, 0, 0, false);
        }
        View view2 = fragment.mView;
        if (view2 != null) {
            if (resourceId != 0) {
                view2.setId(resourceId);
            }
            if (fragment.mView.getTag() == null) {
                fragment.mView.setTag(string);
            }
            return fragment.mView;
        }
        throw new IllegalStateException(C1293.m3413("Fragment ", attributeValue, " did not create a view."));
    }

    @Override // ῲ.Ԕ.K.AbstractC1531
    public void removeOnBackStackChangedListener(AbstractC1531.AbstractC1532 r2) {
        ArrayList<AbstractC1531.AbstractC1532> arrayList = this.f5667;
        if (arrayList != null) {
            arrayList.remove(r2);
        }
    }

    public String toString() {
        StringBuilder sb = new StringBuilder(128);
        sb.append("FragmentManager{");
        sb.append(Integer.toHexString(System.identityHashCode(this)));
        sb.append(" in ");
        Fragment fragment = this.f5676;
        if (fragment != null) {
            C2369.m6334((Object) fragment, sb);
        } else {
            C2369.m6334((Object) this.f5668, sb);
        }
        sb.append("}}");
        return sb.toString();
    }

    /* renamed from: ʬ  reason: contains not printable characters */
    public void m3976(Fragment fragment) {
        Animator animator;
        if (fragment.mView != null) {
            C1547 r0 = m4022(fragment, fragment.getNextTransition(), !fragment.mHidden, fragment.getNextTransitionStyle());
            if (r0 == null || (animator = r0.f5682) == null) {
                if (r0 != null) {
                    fragment.mView.startAnimation(r0.f5683);
                    r0.f5683.start();
                }
                fragment.mView.setVisibility((!fragment.mHidden || fragment.isHideReplaced()) ? 0 : 8);
                if (fragment.isHideReplaced()) {
                    fragment.setHideReplaced(false);
                }
            } else {
                animator.setTarget(fragment.mView);
                if (!fragment.mHidden) {
                    fragment.mView.setVisibility(0);
                } else if (fragment.isHideReplaced()) {
                    fragment.setHideReplaced(false);
                } else {
                    ViewGroup viewGroup = fragment.mContainer;
                    View view = fragment.mView;
                    viewGroup.startViewTransition(view);
                    r0.f5682.addListener(new C1546(this, viewGroup, view, fragment));
                }
                r0.f5682.start();
            }
        }
        if (fragment.mAdded && m4063(fragment)) {
            this.f5673 = true;
        }
        fragment.mHiddenChanged = false;
        fragment.onHiddenChanged(fragment.mHidden);
    }

    /* renamed from: Ԕ  reason: contains not printable characters */
    public void m3982(Fragment fragment) {
        ViewGroup viewGroup;
        int indexOfChild;
        int indexOfChild2;
        if (fragment != null && this.f5675.containsKey(fragment.mWho)) {
            int i = this.f5658;
            if (fragment.mRemoving) {
                if (fragment.isInBackStack()) {
                    i = Math.min(i, 1);
                } else {
                    i = Math.min(i, 0);
                }
            }
            m4033(fragment, i, fragment.getNextTransition(), fragment.getNextTransitionStyle(), false);
            View view = fragment.mView;
            if (view != null) {
                ViewGroup viewGroup2 = fragment.mContainer;
                Fragment fragment2 = null;
                if (viewGroup2 != null && view != null) {
                    int indexOf = this.f5662.indexOf(fragment);
                    while (true) {
                        indexOf--;
                        if (indexOf < 0) {
                            break;
                        }
                        Fragment fragment3 = this.f5662.get(indexOf);
                        if (fragment3.mContainer == viewGroup2 && fragment3.mView != null) {
                            fragment2 = fragment3;
                            break;
                        }
                    }
                }
                if (fragment2 != null && (indexOfChild2 = viewGroup.indexOfChild(fragment.mView)) < (indexOfChild = (viewGroup = fragment.mContainer).indexOfChild(fragment2.mView))) {
                    viewGroup.removeViewAt(indexOfChild2);
                    viewGroup.addView(fragment.mView, indexOfChild);
                }
                if (fragment.mIsNewlyAdded && fragment.mContainer != null) {
                    float f = fragment.mPostponedAlpha;
                    if (f > 0.0f) {
                        fragment.mView.setAlpha(f);
                    }
                    fragment.mPostponedAlpha = 0.0f;
                    fragment.mIsNewlyAdded = false;
                    C1547 r0 = m4022(fragment, fragment.getNextTransition(), true, fragment.getNextTransitionStyle());
                    if (r0 != null) {
                        Animation animation = r0.f5683;
                        if (animation != null) {
                            fragment.mView.startAnimation(animation);
                        } else {
                            r0.f5682.setTarget(fragment.mView);
                            r0.f5682.start();
                        }
                    }
                }
            }
            if (fragment.mHiddenChanged) {
                m3976(fragment);
            }
        }
    }

    /* JADX INFO: finally extract failed */
    /* renamed from: Ԛ  reason: contains not printable characters */
    public boolean m3984() {
        m3980(true);
        boolean z = false;
        while (m4016(this.f5665, this.f5669)) {
            this.f5652 = true;
            try {
                m3979(this.f5665, this.f5669);
                m4002();
                z = true;
            } catch (Throwable th) {
                m4002();
                throw th;
            }
        }
        m3995();
        m4078();
        m4065();
        return z;
    }

    /* renamed from: ؿ  reason: contains not printable characters */
    public void m3986(Fragment fragment) {
        if (!fragment.mDeferStart) {
            return;
        }
        if (this.f5652) {
            this.f5664 = true;
            return;
        }
        fragment.mDeferStart = false;
        m4033(fragment, this.f5658, 0, 0, false);
    }

    /* renamed from: ݜ  reason: contains not printable characters */
    public Bundle m3987(Fragment fragment) {
        Bundle bundle;
        if (this.f5660 == null) {
            this.f5660 = new Bundle();
        }
        fragment.performSaveInstanceState(this.f5660);
        m4072(fragment, this.f5660, false);
        if (!this.f5660.isEmpty()) {
            bundle = this.f5660;
            this.f5660 = null;
        } else {
            bundle = null;
        }
        if (fragment.mView != null) {
            m4079(fragment);
        }
        if (fragment.mSavedViewState != null) {
            if (bundle == null) {
                bundle = new Bundle();
            }
            bundle.putSparseParcelableArray("android:view_state", fragment.mSavedViewState);
        }
        if (!fragment.mUserVisibleHint) {
            if (bundle == null) {
                bundle = new Bundle();
            }
            bundle.putBoolean("android:user_visible_hint", fragment.mUserVisibleHint);
        }
        return bundle;
    }

    @Override // ῲ.Ԕ.K.AbstractC1531
    /* renamed from: ඓ  reason: contains not printable characters */
    public boolean m3991() {
        m4076();
        m3984();
        m3980(true);
        Fragment fragment = this.f5649;
        if (fragment != null && fragment.getChildFragmentManager().m3912()) {
            return true;
        }
        boolean r1 = m4051(this.f5665, this.f5669, (String) null, -1, 0);
        if (r1) {
            this.f5652 = true;
            try {
                m3979(this.f5665, this.f5669);
            } finally {
                m4002();
            }
        }
        m3995();
        m4078();
        m4065();
        return r1;
    }

    /* renamed from: ᆯ  reason: contains not printable characters */
    public Parcelable m3992() {
        BackStackState[] backStackStateArr;
        ArrayList<String> arrayList;
        int size;
        m4068();
        Iterator<Fragment> it2 = this.f5675.values().iterator();
        while (true) {
            backStackStateArr = null;
            if (!it2.hasNext()) {
                break;
            }
            Fragment next = it2.next();
            if (next != null) {
                if (next.getAnimatingAway() != null) {
                    int stateAfterAnimating = next.getStateAfterAnimating();
                    View animatingAway = next.getAnimatingAway();
                    Animation animation = animatingAway.getAnimation();
                    if (animation != null) {
                        animation.cancel();
                        animatingAway.clearAnimation();
                    }
                    next.setAnimatingAway(null);
                    m4033(next, stateAfterAnimating, 0, 0, false);
                } else if (next.getAnimator() != null) {
                    next.getAnimator().end();
                }
            }
        }
        m3984();
        this.f5657 = true;
        if (this.f5675.isEmpty()) {
            return null;
        }
        ArrayList<FragmentState> arrayList2 = new ArrayList<>(this.f5675.size());
        boolean z = false;
        for (Fragment fragment : this.f5675.values()) {
            if (fragment != null) {
                if (fragment.mFragmentManager == this) {
                    FragmentState fragmentState = new FragmentState(fragment);
                    arrayList2.add(fragmentState);
                    if (fragment.mState <= 0 || fragmentState.f1304 != null) {
                        fragmentState.f1304 = fragment.mSavedFragmentState;
                    } else {
                        fragmentState.f1304 = m3987(fragment);
                        String str = fragment.mTargetWho;
                        if (str != null) {
                            Fragment fragment2 = this.f5675.get(str);
                            if (fragment2 != null) {
                                if (fragmentState.f1304 == null) {
                                    fragmentState.f1304 = new Bundle();
                                }
                                m4029(fragmentState.f1304, "android:target_state", fragment2);
                                int i = fragment.mTargetRequestCode;
                                if (i != 0) {
                                    fragmentState.f1304.putInt("android:target_req_state", i);
                                }
                            } else {
                                m4039(new IllegalStateException("Failure saving state: " + fragment + " has target not in fragment manager: " + fragment.mTargetWho));
                                throw null;
                            }
                        }
                    }
                    z = true;
                } else {
                    m4039(new IllegalStateException(C1293.m3411("Failure saving state: active ", fragment, " was removed from the FragmentManager")));
                    throw null;
                }
            }
        }
        if (!z) {
            return null;
        }
        int size2 = this.f5662.size();
        if (size2 > 0) {
            arrayList = new ArrayList<>(size2);
            Iterator<Fragment> it3 = this.f5662.iterator();
            while (it3.hasNext()) {
                Fragment next2 = it3.next();
                arrayList.add(next2.mWho);
                if (next2.mFragmentManager != this) {
                    m4039(new IllegalStateException(C1293.m3411("Failure saving state: active ", next2, " was removed from the FragmentManager")));
                    throw null;
                }
            }
        } else {
            arrayList = null;
        }
        ArrayList<C1535> arrayList3 = this.f5661;
        if (arrayList3 != null && (size = arrayList3.size()) > 0) {
            backStackStateArr = new BackStackState[size];
            for (int i2 = 0; i2 < size; i2++) {
                backStackStateArr[i2] = new BackStackState(this.f5661.get(i2));
            }
        }
        FragmentManagerState fragmentManagerState = new FragmentManagerState();
        fragmentManagerState.f1300 = arrayList2;
        fragmentManagerState.f1298 = arrayList;
        fragmentManagerState.f1302 = backStackStateArr;
        Fragment fragment3 = this.f5649;
        if (fragment3 != null) {
            fragmentManagerState.f1299 = fragment3.mWho;
        }
        fragmentManagerState.f1301 = this.f5672;
        return fragmentManagerState;
    }

    /* renamed from: ሽ  reason: contains not printable characters */
    public void m3993() {
        for (Fragment fragment : this.f5675.values()) {
            if (fragment != null) {
                m3986(fragment);
            }
        }
    }

    /* renamed from: ᑓ  reason: contains not printable characters */
    public Fragment m3994() {
        return this.f5649;
    }

    /* renamed from: ᑾ  reason: contains not printable characters */
    public final void m3995() {
        ArrayList<AbstractC1549> arrayList = this.f5674;
        boolean z = true;
        if (arrayList == null || arrayList.isEmpty()) {
            AbstractC2196 r0 = this.f5666;
            if (m3996() <= 0 || !m4000(this.f5676)) {
                z = false;
            }
            r0.f7656 = z;
            return;
        }
        this.f5666.f7656 = true;
    }

    /* renamed from: ᓆ  reason: contains not printable characters */
    public int m3996() {
        ArrayList<C1535> arrayList = this.f5661;
        if (arrayList != null) {
            return arrayList.size();
        }
        return 0;
    }

    /* renamed from: ᓣ  reason: contains not printable characters */
    public void m3998(Fragment fragment) {
        boolean z = !fragment.isInBackStack();
        if (!fragment.mDetached || z) {
            synchronized (this.f5662) {
                this.f5662.remove(fragment);
            }
            if (m4063(fragment)) {
                this.f5673 = true;
            }
            fragment.mAdded = false;
            fragment.mRemoving = true;
        }
    }

    /* renamed from: ᕣ  reason: contains not printable characters */
    public boolean m4000(Fragment fragment) {
        if (fragment == null) {
            return true;
        }
        LayoutInflater$Factory2C1545 r1 = fragment.mFragmentManager;
        if (fragment != r1.m3994() || !m4000(r1.f5676)) {
            return false;
        }
        return true;
    }

    /* renamed from: ᝁ  reason: contains not printable characters */
    public void m4001() {
        if (this.f5667 != null) {
            for (int i = 0; i < this.f5667.size(); i++) {
                this.f5667.get(i).m3920();
            }
        }
    }

    /* renamed from: ᨨ  reason: contains not printable characters */
    public void m4003(Fragment fragment) {
        if (!fragment.mHidden) {
            fragment.mHidden = true;
            fragment.mHiddenChanged = true ^ fragment.mHiddenChanged;
        }
    }

    @Override // ῲ.Ԕ.K.AbstractC1531
    /* renamed from: ῲ  reason: contains not printable characters */
    public boolean m4013() {
        boolean r0 = m3984();
        m4068();
        return r0;
    }

    /* renamed from: ⁱ  reason: contains not printable characters */
    public C1525 m4017(Fragment fragment) {
        return this.f5654.m3902(fragment);
    }

    /* renamed from: K  reason: contains not printable characters */
    public final void m4039(RuntimeException runtimeException) {
        Log.e("FragmentManager", runtimeException.getMessage());
        Log.e("FragmentManager", "Activity state:");
        PrintWriter printWriter = new PrintWriter(new C1867("FragmentManager"));
        AbstractC1542 r0 = this.f5668;
        if (r0 != null) {
            try {
                FragmentActivity.this.dump("  ", null, printWriter, new String[0]);
            } catch (Exception e) {
                Log.e("FragmentManager", "Failed dumping state", e);
            }
        } else {
            try {
                m4040("  ", (FileDescriptor) null, printWriter, new String[0]);
            } catch (Exception e2) {
                Log.e("FragmentManager", "Failed dumping state", e2);
            }
        }
        throw runtimeException;
    }

    /* renamed from: ⶍ  reason: contains not printable characters */
    public void m4052() {
        synchronized (this) {
            boolean z = false;
            boolean z2 = this.f5663 != null && !this.f5663.isEmpty();
            if (this.f5674 != null && this.f5674.size() == 1) {
                z = true;
            }
            if (z2 || z) {
                this.f5668.f5642.removeCallbacks(this.f5656);
                this.f5668.f5642.post(this.f5656);
                m3995();
            }
        }
    }

    /* renamed from: ゎ  reason: contains not printable characters */
    public void m4053() {
        m3984();
        if (this.f5666.f7656) {
            m3991();
        } else {
            this.f5659.m121();
        }
    }

    /* renamed from: ト  reason: contains not printable characters */
    public boolean m4054() {
        return this.f5655;
    }

    /* renamed from: 㑃  reason: contains not printable characters */
    public void m4056(Fragment fragment) {
        if (this.f5675.get(fragment.mWho) == null) {
            this.f5675.put(fragment.mWho, fragment);
            if (fragment.mRetainInstanceChangedWhileDetached) {
                if (fragment.mRetainInstance) {
                    m4032(fragment);
                } else {
                    m4060(fragment);
                }
                fragment.mRetainInstanceChangedWhileDetached = false;
            }
        }
    }

    /* renamed from: 㗗  reason: contains not printable characters */
    public void m4058(Fragment fragment) {
        m4033(fragment, this.f5658, 0, 0, false);
    }

    /* renamed from: 㗽  reason: contains not printable characters */
    public void m4060(Fragment fragment) {
        if (!m4061()) {
            this.f5654.m3903(fragment);
        }
    }

    /* renamed from: 㮔  reason: contains not printable characters */
    public boolean m4061() {
        return this.f5657 || this.f5671;
    }

    /* renamed from: 㳳  reason: contains not printable characters */
    public void m4062() {
        this.f5657 = false;
        this.f5671 = false;
        m4024(2);
    }

    /* renamed from: 㴪  reason: contains not printable characters */
    public LayoutInflater.Factory2 m4064() {
        return this;
    }

    /* renamed from: 㴹  reason: contains not printable characters */
    public void m4066(Fragment fragment) {
        if (fragment.mFromLayout && !fragment.mPerformedCreateView) {
            fragment.performCreateView(fragment.performGetLayoutInflater(fragment.mSavedFragmentState), null, fragment.mSavedFragmentState);
            View view = fragment.mView;
            if (view != null) {
                fragment.mInnerView = view;
                view.setSaveFromParentEnabled(false);
                if (fragment.mHidden) {
                    fragment.mView.setVisibility(8);
                }
                fragment.onViewCreated(fragment.mView, fragment.mSavedFragmentState);
                m4036(fragment, fragment.mView, fragment.mSavedFragmentState, false);
                return;
            }
            fragment.mInnerView = null;
        }
    }

    /* renamed from: 㶋  reason: contains not printable characters */
    public void m4069(Fragment fragment) {
        if (fragment.mHidden) {
            fragment.mHidden = false;
            fragment.mHiddenChanged = !fragment.mHiddenChanged;
        }
    }

    @Override // ῲ.Ԕ.K.AbstractC1531
    /* renamed from: 㸾  reason: contains not printable characters */
    public List<Fragment> m4070() {
        List<Fragment> list;
        if (this.f5662.isEmpty()) {
            return Collections.emptyList();
        }
        synchronized (this.f5662) {
            list = (List) this.f5662.clone();
        }
        return list;
    }

    /* renamed from: 㿎  reason: contains not printable characters */
    public C1568 m4075(Fragment fragment) {
        return this.f5654.m3908(fragment);
    }

    /* renamed from: 䀟  reason: contains not printable characters */
    public void m4078() {
        if (this.f5664) {
            this.f5664 = false;
            m3993();
        }
    }

    /* renamed from: 䁗  reason: contains not printable characters */
    public void m4081(Fragment fragment) {
        if (this.f5675.get(fragment.mWho) != null) {
            for (Fragment fragment2 : this.f5675.values()) {
                if (fragment2 != null && fragment.mWho.equals(fragment2.mTargetWho)) {
                    fragment2.mTarget = fragment;
                    fragment2.mTargetWho = null;
                }
            }
            this.f5675.put(fragment.mWho, null);
            m4060(fragment);
            String str = fragment.mTargetWho;
            if (str != null) {
                fragment.mTarget = this.f5675.get(str);
            }
            fragment.initState();
        }
    }

    /* renamed from: 䃖  reason: contains not printable characters */
    public void m4082() {
        this.f5657 = false;
        this.f5671 = false;
        int size = this.f5662.size();
        for (int i = 0; i < size; i++) {
            Fragment fragment = this.f5662.get(i);
            if (fragment != null) {
                fragment.noteStateNotSaved();
            }
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:8:0x001e  */
    /* renamed from: ⁱ  reason: contains not printable characters */
    public void m4018(Fragment fragment, boolean z) {
        Fragment fragment2 = this.f5676;
        if (fragment2 != null) {
            AbstractC1531 fragmentManager = fragment2.getFragmentManager();
            if (fragmentManager instanceof LayoutInflater$Factory2C1545) {
                ((LayoutInflater$Factory2C1545) fragmentManager).m4018(fragment, true);
            }
        }
        Iterator<C1551> it2 = this.f5650.iterator();
        while (it2.hasNext()) {
            C1551 next = it2.next();
            if (!z || next.f5688) {
                AbstractC1531.AbstractC1533 r3 = next.f5689;
                throw null;
            }
            while (it2.hasNext()) {
            }
        }
    }

    /* renamed from: 㗗  reason: contains not printable characters */
    public void m4057() {
        m4024(3);
    }

    /* renamed from: 㿎  reason: contains not printable characters */
    public final void m4076() {
        if (m4061()) {
            throw new IllegalStateException("Can not perform this action after onSaveInstanceState");
        }
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public void m4007(Fragment fragment) {
        if (fragment.mDetached) {
            fragment.mDetached = false;
            if (fragment.mAdded) {
                return;
            }
            if (!this.f5662.contains(fragment)) {
                synchronized (this.f5662) {
                    this.f5662.add(fragment);
                }
                fragment.mAdded = true;
                if (m4063(fragment)) {
                    this.f5673 = true;
                    return;
                }
                return;
            }
            throw new IllegalStateException("Fragment already added: " + fragment);
        }
    }

    /* renamed from: 㗽  reason: contains not printable characters */
    public void m4059() {
        this.f5657 = false;
        this.f5671 = false;
        m4024(3);
    }

    /* renamed from: ῲ.Ԕ.K.㿎$ඓ  reason: contains not printable characters */
    /* compiled from: FragmentManagerImpl */
    public static class C1547 {

        /* renamed from: ῲ  reason: contains not printable characters */
        public final Animator f5682;

        /* renamed from: K  reason: contains not printable characters */
        public final Animation f5683;

        public C1547(Animation animation) {
            this.f5683 = animation;
            this.f5682 = null;
            if (animation == null) {
                throw new IllegalStateException("Animation cannot be null");
            }
        }

        public C1547(Animator animator) {
            this.f5683 = null;
            this.f5682 = animator;
            if (animator == null) {
                throw new IllegalStateException("Animator cannot be null");
            }
        }
    }

    /* renamed from: ᨨ  reason: contains not printable characters */
    public final void m4002() {
        this.f5652 = false;
        this.f5669.clear();
        this.f5665.clear();
    }

    /* renamed from: 㳳  reason: contains not printable characters */
    public final boolean m4063(Fragment fragment) {
        return (fragment.mHasMenu && fragment.mMenuVisible) || fragment.mChildFragmentManager.m4019();
    }

    /* renamed from: 㶋  reason: contains not printable characters */
    public final void m4068() {
        if (this.f5663 != null) {
            while (!this.f5663.isEmpty()) {
                this.f5663.remove(0).m4083();
            }
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:8:0x001e  */
    /* renamed from: 㿎  reason: contains not printable characters */
    public void m4077(Fragment fragment, boolean z) {
        Fragment fragment2 = this.f5676;
        if (fragment2 != null) {
            AbstractC1531 fragmentManager = fragment2.getFragmentManager();
            if (fragmentManager instanceof LayoutInflater$Factory2C1545) {
                ((LayoutInflater$Factory2C1545) fragmentManager).m4077(fragment, true);
            }
        }
        Iterator<C1551> it2 = this.f5650.iterator();
        while (it2.hasNext()) {
            C1551 next = it2.next();
            if (!z || next.f5688) {
                AbstractC1531.AbstractC1533 r3 = next.f5689;
                throw null;
            }
            while (it2.hasNext()) {
            }
        }
    }

    /* renamed from: 䀟  reason: contains not printable characters */
    public void m4079(Fragment fragment) {
        if (fragment.mInnerView != null) {
            SparseArray<Parcelable> sparseArray = this.f5653;
            if (sparseArray == null) {
                this.f5653 = new SparseArray<>();
            } else {
                sparseArray.clear();
            }
            fragment.mInnerView.saveHierarchyState(this.f5653);
            if (this.f5653.size() > 0) {
                fragment.mSavedViewState = this.f5653;
                this.f5653 = null;
            }
        }
    }

    /* renamed from: ᕣ  reason: contains not printable characters */
    public void m3999() {
        this.f5657 = false;
        this.f5671 = false;
        m4024(1);
    }

    /* renamed from: ῲ.Ԕ.K.㿎$㴹  reason: contains not printable characters */
    /* compiled from: FragmentManagerImpl */
    public static class RunnableC1554 extends AnimationSet implements Runnable {

        /* renamed from: ʬ  reason: contains not printable characters */
        public final View f5695;

        /* renamed from: ඓ  reason: contains not printable characters */
        public boolean f5696;

        /* renamed from: ῲ  reason: contains not printable characters */
        public final ViewGroup f5697;

        /* renamed from: 㴹  reason: contains not printable characters */
        public boolean f5698 = true;

        /* renamed from: 㸾  reason: contains not printable characters */
        public boolean f5699;

        public RunnableC1554(Animation animation, ViewGroup viewGroup, View view) {
            super(false);
            this.f5697 = viewGroup;
            this.f5695 = view;
            addAnimation(animation);
            this.f5697.post(this);
        }

        public boolean getTransformation(long j, Transformation transformation) {
            this.f5698 = true;
            if (this.f5699) {
                return !this.f5696;
            }
            if (!super.getTransformation(j, transformation)) {
                this.f5699 = true;
                ViewTreeObserver$OnPreDrawListenerC1728.m4435(this.f5697, this);
            }
            return true;
        }

        public void run() {
            if (this.f5699 || !this.f5698) {
                this.f5697.endViewTransition(this.f5695);
                this.f5696 = true;
                return;
            }
            this.f5698 = false;
            this.f5697.post(this);
        }

        public boolean getTransformation(long j, Transformation transformation, float f) {
            this.f5698 = true;
            if (this.f5699) {
                return !this.f5696;
            }
            if (!super.getTransformation(j, transformation, f)) {
                this.f5699 = true;
                ViewTreeObserver$OnPreDrawListenerC1728.m4435(this.f5697, this);
            }
            return true;
        }
    }

    /* renamed from: ؿ  reason: contains not printable characters */
    public void m3985() {
        m3995();
        m3989(this.f5649);
    }

    /* renamed from: 㸾  reason: contains not printable characters */
    public boolean m4074(int i) {
        return this.f5658 >= i;
    }

    /* renamed from: 㸾  reason: contains not printable characters */
    public void m4071(Fragment fragment) {
        if (!fragment.mDetached) {
            fragment.mDetached = true;
            if (fragment.mAdded) {
                synchronized (this.f5662) {
                    this.f5662.remove(fragment);
                }
                if (m4063(fragment)) {
                    this.f5673 = true;
                }
                fragment.mAdded = false;
            }
        }
    }

    /* renamed from: 㑃  reason: contains not printable characters */
    public void m4055() {
        this.f5655 = true;
        m3984();
        m4024(0);
        this.f5668 = null;
        this.f5651 = null;
        this.f5676 = null;
        if (this.f5659 != null) {
            Iterator<AbstractC2197> it2 = this.f5666.f7655.iterator();
            while (it2.hasNext()) {
                it2.next().cancel();
            }
            this.f5659 = null;
        }
    }

    /* renamed from: Ԛ  reason: contains not printable characters */
    public void m3983(Fragment fragment) {
        if (fragment == null || (this.f5675.get(fragment.mWho) == fragment && (fragment.mHost == null || fragment.getFragmentManager() == this))) {
            Fragment fragment2 = this.f5649;
            this.f5649 = fragment;
            m3989(fragment2);
            m3989(this.f5649);
            return;
        }
        throw new IllegalArgumentException("Fragment " + fragment + " is not an active fragment of FragmentManager " + this);
    }

    /* renamed from: ⁱ  reason: contains not printable characters */
    public boolean m4019() {
        boolean z = false;
        for (Fragment fragment : this.f5675.values()) {
            if (fragment != null) {
                z = m4063(fragment);
                continue;
            }
            if (z) {
                return true;
            }
        }
        return false;
    }

    /* renamed from: 㴹  reason: contains not printable characters */
    public final void m4065() {
        this.f5675.values().removeAll(Collections.singleton(null));
    }

    /* renamed from: ᓣ  reason: contains not printable characters */
    public void m3997() {
        this.f5657 = false;
        this.f5671 = false;
        m4024(4);
    }

    /* renamed from: 䁗  reason: contains not printable characters */
    public void m4080() {
        m4024(1);
    }

    @Override // ῲ.Ԕ.K.AbstractC1531
    /* renamed from: K  reason: contains not printable characters */
    public AbstractC1558 m4023() {
        return new C1535(this);
    }

    /* JADX WARNING: Removed duplicated region for block: B:8:0x001e  */
    /* renamed from: 㴹  reason: contains not printable characters */
    public void m4067(Fragment fragment, boolean z) {
        Fragment fragment2 = this.f5676;
        if (fragment2 != null) {
            AbstractC1531 fragmentManager = fragment2.getFragmentManager();
            if (fragmentManager instanceof LayoutInflater$Factory2C1545) {
                ((LayoutInflater$Factory2C1545) fragmentManager).m4067(fragment, true);
            }
        }
        Iterator<C1551> it2 = this.f5650.iterator();
        while (it2.hasNext()) {
            C1551 next = it2.next();
            if (!z || next.f5688) {
                AbstractC1531.AbstractC1533 r3 = next.f5689;
                throw null;
            }
            while (it2.hasNext()) {
            }
        }
    }

    @Override // ῲ.Ԕ.K.AbstractC1531
    /* renamed from: K  reason: contains not printable characters */
    public void m4025(int i, int i2) {
        if (i >= 0) {
            m4046((AbstractC1549) new C1553(null, i, i2), false);
            return;
        }
        throw new IllegalArgumentException(C1293.m3408("Bad id: ", i));
    }

    /* renamed from: ඓ  reason: contains not printable characters */
    public final void m3989(Fragment fragment) {
        if (fragment != null && this.f5675.get(fragment.mWho) == fragment) {
            fragment.performPrimaryNavigationFragmentChanged();
        }
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public Fragment m4005(int i) {
        for (int size = this.f5662.size() - 1; size >= 0; size--) {
            Fragment fragment = this.f5662.get(size);
            if (fragment != null && fragment.mFragmentId == i) {
                return fragment;
            }
        }
        for (Fragment fragment2 : this.f5675.values()) {
            if (fragment2 != null && fragment2.mFragmentId == i) {
                return fragment2;
            }
        }
        return null;
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m4029(Bundle bundle, String str, Fragment fragment) {
        if (fragment.mFragmentManager == this) {
            bundle.putString(str, fragment.mWho);
        } else {
            m4039(new IllegalStateException(C1293.m3411("Fragment ", fragment, " is not currently in the FragmentManager")));
            throw null;
        }
    }

    /* renamed from: ݜ  reason: contains not printable characters */
    public void m3988() {
        this.f5671 = true;
        m4024(2);
    }

    /* JADX WARNING: Removed duplicated region for block: B:8:0x001e  */
    /* renamed from: ඓ  reason: contains not printable characters */
    public void m3990(Fragment fragment, boolean z) {
        Fragment fragment2 = this.f5676;
        if (fragment2 != null) {
            AbstractC1531 fragmentManager = fragment2.getFragmentManager();
            if (fragmentManager instanceof LayoutInflater$Factory2C1545) {
                ((LayoutInflater$Factory2C1545) fragmentManager).m3990(fragment, true);
            }
        }
        Iterator<C1551> it2 = this.f5650.iterator();
        while (it2.hasNext()) {
            C1551 next = it2.next();
            if (!z || next.f5688) {
                AbstractC1531.AbstractC1533 r3 = next.f5689;
                throw null;
            }
            while (it2.hasNext()) {
            }
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:8:0x001e  */
    /* renamed from: 㸾  reason: contains not printable characters */
    public void m4073(Fragment fragment, boolean z) {
        Fragment fragment2 = this.f5676;
        if (fragment2 != null) {
            AbstractC1531 fragmentManager = fragment2.getFragmentManager();
            if (fragmentManager instanceof LayoutInflater$Factory2C1545) {
                ((LayoutInflater$Factory2C1545) fragmentManager).m4073(fragment, true);
            }
        }
        Iterator<C1551> it2 = this.f5650.iterator();
        while (it2.hasNext()) {
            C1551 next = it2.next();
            if (!z || next.f5688) {
                AbstractC1531.AbstractC1533 r3 = next.f5689;
                throw null;
            }
            while (it2.hasNext()) {
            }
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public Fragment m4020(Bundle bundle, String str) {
        String string = bundle.getString(str);
        if (string == null) {
            return null;
        }
        Fragment fragment = this.f5675.get(string);
        if (fragment != null) {
            return fragment;
        }
        m4039(new IllegalStateException("Fragment no longer exists for key " + str + ": unique id " + string));
        throw null;
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public Fragment m4006(String str) {
        Fragment findFragmentByWho;
        for (Fragment fragment : this.f5675.values()) {
            if (!(fragment == null || (findFragmentByWho = fragment.findFragmentByWho(str)) == null)) {
                return findFragmentByWho;
            }
        }
        return null;
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m4032(Fragment fragment) {
        if (!m4061()) {
            this.f5654.m3906(fragment);
        }
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public int m4004(C1535 k) {
        synchronized (this) {
            if (this.f5648 != null) {
                if (this.f5648.size() > 0) {
                    int intValue = this.f5648.remove(this.f5648.size() - 1).intValue();
                    this.f5677.set(intValue, k);
                    return intValue;
                }
            }
            if (this.f5677 == null) {
                this.f5677 = new ArrayList<>();
            }
            int size = this.f5677.size();
            this.f5677.add(k);
            return size;
        }
    }

    @Override // ῲ.Ԕ.K.AbstractC1531
    /* renamed from: K  reason: contains not printable characters */
    public void m4040(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
        int size;
        int size2;
        int size3;
        int size4;
        String r0 = C1293.m3412(str, "    ");
        if (!this.f5675.isEmpty()) {
            printWriter.print(str);
            printWriter.print("Active Fragments in ");
            printWriter.print(Integer.toHexString(System.identityHashCode(this)));
            printWriter.println(CertificateUtil.DELIMITER);
            for (Fragment fragment : this.f5675.values()) {
                printWriter.print(str);
                printWriter.println(fragment);
                if (fragment != null) {
                    fragment.dump(r0, fileDescriptor, printWriter, strArr);
                }
            }
        }
        int size5 = this.f5662.size();
        if (size5 > 0) {
            printWriter.print(str);
            printWriter.println("Added Fragments:");
            for (int i = 0; i < size5; i++) {
                printWriter.print(str);
                printWriter.print("  #");
                printWriter.print(i);
                printWriter.print(": ");
                printWriter.println(this.f5662.get(i).toString());
            }
        }
        ArrayList<Fragment> arrayList = this.f5670;
        if (arrayList != null && (size4 = arrayList.size()) > 0) {
            printWriter.print(str);
            printWriter.println("Fragments Created Menus:");
            for (int i2 = 0; i2 < size4; i2++) {
                printWriter.print(str);
                printWriter.print("  #");
                printWriter.print(i2);
                printWriter.print(": ");
                printWriter.println(this.f5670.get(i2).toString());
            }
        }
        ArrayList<C1535> arrayList2 = this.f5661;
        if (arrayList2 != null && (size3 = arrayList2.size()) > 0) {
            printWriter.print(str);
            printWriter.println("Back Stack:");
            for (int i3 = 0; i3 < size3; i3++) {
                C1535 k = this.f5661.get(i3);
                printWriter.print(str);
                printWriter.print("  #");
                printWriter.print(i3);
                printWriter.print(": ");
                printWriter.println(k.toString());
                k.m3938(r0, printWriter);
            }
        }
        synchronized (this) {
            if (this.f5677 != null && (size2 = this.f5677.size()) > 0) {
                printWriter.print(str);
                printWriter.println("Back Stack Indices:");
                for (int i4 = 0; i4 < size2; i4++) {
                    printWriter.print(str);
                    printWriter.print("  #");
                    printWriter.print(i4);
                    printWriter.print(": ");
                    printWriter.println((C1535) this.f5677.get(i4));
                }
            }
            if (this.f5648 != null && this.f5648.size() > 0) {
                printWriter.print(str);
                printWriter.print("mAvailBackStackIndices: ");
                printWriter.println(Arrays.toString(this.f5648.toArray()));
            }
        }
        ArrayList<AbstractC1549> arrayList3 = this.f5674;
        if (arrayList3 != null && (size = arrayList3.size()) > 0) {
            printWriter.print(str);
            printWriter.println("Pending Actions:");
            for (int i5 = 0; i5 < size; i5++) {
                printWriter.print(str);
                printWriter.print("  #");
                printWriter.print(i5);
                printWriter.print(": ");
                printWriter.println((AbstractC1549) this.f5674.get(i5));
            }
        }
        printWriter.print(str);
        printWriter.println("FragmentManager misc state:");
        printWriter.print(str);
        printWriter.print("  mHost=");
        printWriter.println(this.f5668);
        printWriter.print(str);
        printWriter.print("  mContainer=");
        printWriter.println(this.f5651);
        if (this.f5676 != null) {
            printWriter.print(str);
            printWriter.print("  mParent=");
            printWriter.println(this.f5676);
        }
        printWriter.print(str);
        printWriter.print("  mCurState=");
        printWriter.print(this.f5658);
        printWriter.print(" mStateSaved=");
        printWriter.print(this.f5657);
        printWriter.print(" mStopped=");
        printWriter.print(this.f5671);
        printWriter.print(" mDestroyed=");
        printWriter.println(this.f5655);
        if (this.f5673) {
            printWriter.print(str);
            printWriter.print("  mNeedMenuInvalidate=");
            printWriter.println(this.f5673);
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:8:0x001e  */
    /* renamed from: 㸾  reason: contains not printable characters */
    public void m4072(Fragment fragment, Bundle bundle, boolean z) {
        Fragment fragment2 = this.f5676;
        if (fragment2 != null) {
            AbstractC1531 fragmentManager = fragment2.getFragmentManager();
            if (fragmentManager instanceof LayoutInflater$Factory2C1545) {
                ((LayoutInflater$Factory2C1545) fragmentManager).m4072(fragment, bundle, true);
            }
        }
        Iterator<C1551> it2 = this.f5650.iterator();
        while (it2.hasNext()) {
            C1551 next = it2.next();
            if (!z || next.f5688) {
                AbstractC1531.AbstractC1533 r3 = next.f5689;
                throw null;
            }
            while (it2.hasNext()) {
            }
        }
    }

    /* renamed from: ʬ  reason: contains not printable characters */
    public void m3975(int i) {
        synchronized (this) {
            this.f5677.set(i, null);
            if (this.f5648 == null) {
                this.f5648 = new ArrayList<>();
            }
            this.f5648.add(Integer.valueOf(i));
        }
    }

    /* renamed from: ʬ  reason: contains not printable characters */
    public final void m3980(boolean z) {
        if (this.f5652) {
            throw new IllegalStateException("FragmentManager is already executing transactions");
        } else if (this.f5668 == null) {
            throw new IllegalStateException("Fragment host has been destroyed");
        } else if (Looper.myLooper() == this.f5668.f5642.getLooper()) {
            if (!z) {
                m4076();
            }
            if (this.f5665 == null) {
                this.f5665 = new ArrayList<>();
                this.f5669 = new ArrayList<>();
            }
            this.f5652 = true;
            try {
                m4041((ArrayList<C1535>) null, (ArrayList<Boolean>) null);
            } finally {
                this.f5652 = false;
            }
        } else {
            throw new IllegalStateException("Must be called from main thread of fragment host");
        }
    }

    /* renamed from: Ԕ  reason: contains not printable characters */
    public void m3981() {
        for (int i = 0; i < this.f5662.size(); i++) {
            Fragment fragment = this.f5662.get(i);
            if (fragment != null) {
                fragment.performLowMemory();
            }
        }
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public void m4011(AbstractC1549 r2, boolean z) {
        if (!z || (this.f5668 != null && !this.f5655)) {
            m3980(z);
            if (r2.m4084(this.f5665, this.f5669)) {
                this.f5652 = true;
                try {
                    m3979(this.f5665, this.f5669);
                } finally {
                    m4002();
                }
            }
            m3995();
            m4078();
            m4065();
        }
    }

    public View onCreateView(String str, Context context, AttributeSet attributeSet) {
        return onCreateView(null, str, context, attributeSet);
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public final boolean m4016(ArrayList<C1535> arrayList, ArrayList<Boolean> arrayList2) {
        synchronized (this) {
            if (this.f5674 != null) {
                if (this.f5674.size() != 0) {
                    int size = this.f5674.size();
                    boolean z = false;
                    for (int i = 0; i < size; i++) {
                        z |= this.f5674.get(i).m4084(arrayList, arrayList2);
                    }
                    this.f5674.clear();
                    this.f5668.f5642.removeCallbacks(this.f5656);
                    return z;
                }
            }
            return false;
        }
    }

    /* renamed from: ʬ  reason: contains not printable characters */
    public final void m3979(ArrayList<C1535> arrayList, ArrayList<Boolean> arrayList2) {
        if (arrayList != null && !arrayList.isEmpty()) {
            if (arrayList2 == null || arrayList.size() != arrayList2.size()) {
                throw new IllegalStateException("Internal error with the back stack records");
            }
            m4041(arrayList, arrayList2);
            int size = arrayList.size();
            int i = 0;
            int i2 = 0;
            while (i < size) {
                if (!arrayList.get(i).f5709) {
                    if (i2 != i) {
                        m4042(arrayList, arrayList2, i2, i);
                    }
                    i2 = i + 1;
                    if (arrayList2.get(i).booleanValue()) {
                        while (i2 < size && arrayList2.get(i2).booleanValue() && !arrayList.get(i2).f5709) {
                            i2++;
                        }
                    }
                    m4042(arrayList, arrayList2, i, i2);
                    i = i2 - 1;
                }
                i++;
            }
            if (i2 != size) {
                m4042(arrayList, arrayList2, i2, size);
            }
        }
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public void m4012(boolean z) {
        for (int size = this.f5662.size() - 1; size >= 0; size--) {
            Fragment fragment = this.f5662.get(size);
            if (fragment != null) {
                fragment.performPictureInPictureModeChanged(z);
            }
        }
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public boolean m4014(Menu menu) {
        if (this.f5658 < 1) {
            return false;
        }
        boolean z = false;
        for (int i = 0; i < this.f5662.size(); i++) {
            Fragment fragment = this.f5662.get(i);
            if (fragment != null && fragment.performPrepareOptionsMenu(menu)) {
                z = true;
            }
        }
        return z;
    }

    @Override // ῲ.Ԕ.K.AbstractC1531
    /* renamed from: ʬ  reason: contains not printable characters */
    public C1522 m3974() {
        if (super.m3911() == AbstractC1531.f5607) {
            Fragment fragment = this.f5676;
            if (fragment != null) {
                return fragment.mFragmentManager.m3974();
            }
            m3918(new C1555());
        }
        return super.m3911();
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public boolean m4015(MenuItem menuItem) {
        if (this.f5658 < 1) {
            return false;
        }
        for (int i = 0; i < this.f5662.size(); i++) {
            Fragment fragment = this.f5662.get(i);
            if (fragment != null && fragment.performOptionsItemSelected(menuItem)) {
                return true;
            }
        }
        return false;
    }

    /* JADX WARNING: Removed duplicated region for block: B:8:0x001e  */
    /* renamed from: ῲ  reason: contains not printable characters */
    public void m4008(Fragment fragment, Context context, boolean z) {
        Fragment fragment2 = this.f5676;
        if (fragment2 != null) {
            AbstractC1531 fragmentManager = fragment2.getFragmentManager();
            if (fragmentManager instanceof LayoutInflater$Factory2C1545) {
                ((LayoutInflater$Factory2C1545) fragmentManager).m4008(fragment, context, true);
            }
        }
        Iterator<C1551> it2 = this.f5650.iterator();
        while (it2.hasNext()) {
            C1551 next = it2.next();
            if (!z || next.f5688) {
                AbstractC1531.AbstractC1533 r3 = next.f5689;
                throw null;
            }
            while (it2.hasNext()) {
            }
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:8:0x001e  */
    /* renamed from: ʬ  reason: contains not printable characters */
    public void m3977(Fragment fragment, Bundle bundle, boolean z) {
        Fragment fragment2 = this.f5676;
        if (fragment2 != null) {
            AbstractC1531 fragmentManager = fragment2.getFragmentManager();
            if (fragmentManager instanceof LayoutInflater$Factory2C1545) {
                ((LayoutInflater$Factory2C1545) fragmentManager).m3977(fragment, bundle, true);
            }
        }
        Iterator<C1551> it2 = this.f5650.iterator();
        while (it2.hasNext()) {
            C1551 next = it2.next();
            if (!z || next.f5688) {
                AbstractC1531.AbstractC1533 r3 = next.f5689;
                throw null;
            }
            while (it2.hasNext()) {
            }
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:8:0x001e  */
    /* renamed from: ῲ  reason: contains not printable characters */
    public void m4009(Fragment fragment, Bundle bundle, boolean z) {
        Fragment fragment2 = this.f5676;
        if (fragment2 != null) {
            AbstractC1531 fragmentManager = fragment2.getFragmentManager();
            if (fragmentManager instanceof LayoutInflater$Factory2C1545) {
                ((LayoutInflater$Factory2C1545) fragmentManager).m4009(fragment, bundle, true);
            }
        }
        Iterator<C1551> it2 = this.f5650.iterator();
        while (it2.hasNext()) {
            C1551 next = it2.next();
            if (!z || next.f5688) {
                AbstractC1531.AbstractC1533 r3 = next.f5689;
                throw null;
            }
            while (it2.hasNext()) {
            }
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:8:0x001e  */
    /* renamed from: ʬ  reason: contains not printable characters */
    public void m3978(Fragment fragment, boolean z) {
        Fragment fragment2 = this.f5676;
        if (fragment2 != null) {
            AbstractC1531 fragmentManager = fragment2.getFragmentManager();
            if (fragmentManager instanceof LayoutInflater$Factory2C1545) {
                ((LayoutInflater$Factory2C1545) fragmentManager).m3978(fragment, true);
            }
        }
        Iterator<C1551> it2 = this.f5650.iterator();
        while (it2.hasNext()) {
            C1551 next = it2.next();
            if (!z || next.f5688) {
                AbstractC1531.AbstractC1533 r3 = next.f5689;
                throw null;
            }
            while (it2.hasNext()) {
            }
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:8:0x001e  */
    /* renamed from: ῲ  reason: contains not printable characters */
    public void m4010(Fragment fragment, boolean z) {
        Fragment fragment2 = this.f5676;
        if (fragment2 != null) {
            AbstractC1531 fragmentManager = fragment2.getFragmentManager();
            if (fragmentManager instanceof LayoutInflater$Factory2C1545) {
                ((LayoutInflater$Factory2C1545) fragmentManager).m4010(fragment, true);
            }
        }
        Iterator<C1551> it2 = this.f5650.iterator();
        while (it2.hasNext()) {
            C1551 next = it2.next();
            if (!z || next.f5688) {
                AbstractC1531.AbstractC1533 r3 = next.f5689;
                throw null;
            }
            while (it2.hasNext()) {
            }
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public static C1547 m3973(float f, float f2, float f3, float f4) {
        AnimationSet animationSet = new AnimationSet(false);
        ScaleAnimation scaleAnimation = new ScaleAnimation(f, f2, f, f2, 1, 0.5f, 1, 0.5f);
        scaleAnimation.setInterpolator(f5646);
        scaleAnimation.setDuration(220);
        animationSet.addAnimation(scaleAnimation);
        AlphaAnimation alphaAnimation = new AlphaAnimation(f3, f4);
        alphaAnimation.setInterpolator(f5647);
        alphaAnimation.setDuration(220);
        animationSet.addAnimation(alphaAnimation);
        return new C1547(animationSet);
    }

    /* JADX WARNING: Removed duplicated region for block: B:28:0x005a A[SYNTHETIC, Splitter:B:28:0x005a] */
    /* renamed from: K  reason: contains not printable characters */
    public C1547 m4022(Fragment fragment, int i, boolean z, int i2) {
        Window window;
        boolean z2;
        int nextAnim = fragment.getNextAnim();
        fragment.setNextAnim(0);
        ViewGroup viewGroup = fragment.mContainer;
        if (viewGroup != null && viewGroup.getLayoutTransition() != null) {
            return null;
        }
        Animation onCreateAnimation = fragment.onCreateAnimation(i, z, nextAnim);
        if (onCreateAnimation != null) {
            return new C1547(onCreateAnimation);
        }
        Animator onCreateAnimator = fragment.onCreateAnimator(i, z, nextAnim);
        if (onCreateAnimator != null) {
            return new C1547(onCreateAnimator);
        }
        boolean z3 = true;
        if (nextAnim != 0) {
            boolean equals = "anim".equals(this.f5668.f5638.getResources().getResourceTypeName(nextAnim));
            if (equals) {
                try {
                    Animation loadAnimation = AnimationUtils.loadAnimation(this.f5668.f5638, nextAnim);
                    if (loadAnimation != null) {
                        return new C1547(loadAnimation);
                    }
                    z2 = true;
                    if (!z2) {
                        try {
                            Animator loadAnimator = AnimatorInflater.loadAnimator(this.f5668.f5638, nextAnim);
                            if (loadAnimator != null) {
                                return new C1547(loadAnimator);
                            }
                        } catch (RuntimeException e) {
                            if (!equals) {
                                Animation loadAnimation2 = AnimationUtils.loadAnimation(this.f5668.f5638, nextAnim);
                                if (loadAnimation2 != null) {
                                    return new C1547(loadAnimation2);
                                }
                            } else {
                                throw e;
                            }
                        }
                    }
                } catch (Resources.NotFoundException e2) {
                    throw e2;
                } catch (RuntimeException unused) {
                }
            }
            z2 = false;
            if (!z2) {
            }
        }
        if (i == 0) {
            return null;
        }
        char c = i != 4097 ? i != 4099 ? i != 8194 ? 65535 : z ? (char) 3 : 4 : z ? (char) 5 : 6 : z ? (char) 1 : 2;
        if (c < 0) {
            return null;
        }
        switch (c) {
            case 1:
                return m3973(1.125f, 1.0f, 0.0f, 1.0f);
            case 2:
                return m3973(1.0f, 0.975f, 1.0f, 0.0f);
            case 3:
                return m3973(0.975f, 1.0f, 0.0f, 1.0f);
            case 4:
                return m3973(1.0f, 1.075f, 1.0f, 0.0f);
            case 5:
                AlphaAnimation alphaAnimation = new AlphaAnimation(0.0f, 1.0f);
                alphaAnimation.setInterpolator(f5647);
                alphaAnimation.setDuration(220);
                return new C1547(alphaAnimation);
            case 6:
                AlphaAnimation alphaAnimation2 = new AlphaAnimation(1.0f, 0.0f);
                alphaAnimation2.setInterpolator(f5647);
                alphaAnimation2.setDuration(220);
                return new C1547(alphaAnimation2);
            default:
                if (i2 == 0) {
                    if (FragmentActivity.this.getWindow() == null) {
                        z3 = false;
                    }
                    if (z3 && (window = FragmentActivity.this.getWindow()) != null) {
                        int i3 = window.getAttributes().windowAnimations;
                    }
                }
                return null;
        }
    }

    /* JADX WARNING: Code restructure failed: missing block: B:43:0x0082, code lost:
        if (r0 != 3) goto L_0x0415;
     */
    /* JADX WARNING: Removed duplicated region for block: B:136:0x027c  */
    /* JADX WARNING: Removed duplicated region for block: B:139:0x0285  */
    /* JADX WARNING: Removed duplicated region for block: B:236:0x041a  */
    /* JADX WARNING: Removed duplicated region for block: B:238:? A[RETURN, SYNTHETIC] */
    /* renamed from: K  reason: contains not printable characters */
    public void m4033(Fragment fragment, int i, int i2, int i3, boolean z) {
        int i4;
        int i5;
        Fragment fragment2;
        ViewGroup viewGroup;
        ViewGroup viewGroup2;
        String str;
        int i6;
        int i7 = 1;
        boolean z2 = true;
        boolean z3 = true;
        if (!fragment.mAdded || fragment.mDetached) {
            i4 = i;
            if (i4 > 1) {
                i4 = 1;
            }
        } else {
            i4 = i;
        }
        if (fragment.mRemoving && i4 > (i6 = fragment.mState)) {
            if (i6 != 0 || !fragment.isInBackStack()) {
                i4 = fragment.mState;
            } else {
                i4 = 1;
            }
        }
        if (fragment.mDeferStart && fragment.mState < 3 && i4 > 2) {
            i4 = 2;
        }
        Lifecycle.State state = fragment.mMaxState;
        if (state == Lifecycle.State.CREATED) {
            i5 = Math.min(i4, 1);
        } else {
            i5 = Math.min(i4, state.ordinal());
        }
        int i8 = i5;
        int i9 = fragment.mState;
        if (i9 <= i8) {
            if (!fragment.mFromLayout || fragment.mInLayout) {
                if (!(fragment.getAnimatingAway() == null && fragment.getAnimator() == null)) {
                    fragment.setAnimatingAway(null);
                    fragment.setAnimator(null);
                    m4033(fragment, fragment.getStateAfterAnimating(), 0, 0, true);
                }
                int i10 = fragment.mState;
                if (i10 != 0) {
                    if (i10 != 1) {
                        if (i10 != 2) {
                        }
                        if (i8 > 2) {
                            fragment.performStart();
                            m4067(fragment, false);
                        }
                        if (i8 > 3) {
                            fragment.performResume();
                            m3990(fragment, false);
                            fragment.mSavedFragmentState = null;
                            fragment.mSavedViewState = null;
                        }
                    }
                } else if (i8 > 0) {
                    Bundle bundle = fragment.mSavedFragmentState;
                    if (bundle != null) {
                        bundle.setClassLoader(this.f5668.f5638.getClassLoader());
                        fragment.mSavedViewState = fragment.mSavedFragmentState.getSparseParcelableArray("android:view_state");
                        Fragment r0 = m4020(fragment.mSavedFragmentState, "android:target_state");
                        fragment.mTargetWho = r0 != null ? r0.mWho : null;
                        if (fragment.mTargetWho != null) {
                            fragment.mTargetRequestCode = fragment.mSavedFragmentState.getInt("android:target_req_state", 0);
                        }
                        Boolean bool = fragment.mSavedUserVisibleHint;
                        if (bool != null) {
                            fragment.mUserVisibleHint = bool.booleanValue();
                            fragment.mSavedUserVisibleHint = null;
                        } else {
                            fragment.mUserVisibleHint = fragment.mSavedFragmentState.getBoolean("android:user_visible_hint", true);
                        }
                        if (!fragment.mUserVisibleHint) {
                            fragment.mDeferStart = true;
                            if (i8 > 2) {
                                i8 = 2;
                            }
                        }
                    }
                    AbstractC1542 r02 = this.f5668;
                    fragment.mHost = r02;
                    Fragment fragment3 = this.f5676;
                    fragment.mParentFragment = fragment3;
                    fragment.mFragmentManager = fragment3 != null ? fragment3.mChildFragmentManager : r02.f5641;
                    Fragment fragment4 = fragment.mTarget;
                    if (fragment4 != null) {
                        Fragment fragment5 = this.f5675.get(fragment4.mWho);
                        Fragment fragment6 = fragment.mTarget;
                        if (fragment5 == fragment6) {
                            if (fragment6.mState < 1) {
                                m4033(fragment6, 1, 0, 0, true);
                            }
                            fragment.mTargetWho = fragment.mTarget.mWho;
                            fragment.mTarget = null;
                        } else {
                            throw new IllegalStateException("Fragment " + fragment + " declared target fragment " + fragment.mTarget + " that does not belong to this FragmentManager!");
                        }
                    }
                    String str2 = fragment.mTargetWho;
                    if (str2 != null) {
                        Fragment fragment7 = this.f5675.get(str2);
                        if (fragment7 == null) {
                            StringBuilder sb = new StringBuilder();
                            sb.append("Fragment ");
                            sb.append(fragment);
                            sb.append(" declared target fragment ");
                            throw new IllegalStateException(C1293.m3414(sb, fragment.mTargetWho, " that does not belong to this FragmentManager!"));
                        } else if (fragment7.mState < 1) {
                            m4033(fragment7, 1, 0, 0, true);
                        }
                    }
                    m4008(fragment, this.f5668.f5638, false);
                    fragment.performAttach();
                    Fragment fragment8 = fragment.mParentFragment;
                    if (fragment8 == null) {
                        FragmentActivity.this.onAttachFragment(fragment);
                    } else {
                        fragment8.onAttachFragment(fragment);
                    }
                    m4034(fragment, this.f5668.f5638, false);
                    if (!fragment.mIsCreated) {
                        m3977(fragment, fragment.mSavedFragmentState, false);
                        fragment.performCreate(fragment.mSavedFragmentState);
                        m4009(fragment, fragment.mSavedFragmentState, false);
                    } else {
                        fragment.restoreChildFragmentState(fragment.mSavedFragmentState);
                        fragment.mState = 1;
                    }
                }
                if (i8 > 0) {
                    m4066(fragment);
                }
                if (i8 > 1) {
                    if (!fragment.mFromLayout) {
                        int i11 = fragment.mContainerId;
                        if (i11 == 0) {
                            viewGroup2 = null;
                        } else if (i11 != -1) {
                            viewGroup2 = (ViewGroup) this.f5651.m3855(i11);
                            if (viewGroup2 == null && !fragment.mRestored) {
                                try {
                                    str = fragment.getResources().getResourceName(fragment.mContainerId);
                                } catch (Resources.NotFoundException unused) {
                                    str = "unknown";
                                }
                                StringBuilder r2 = C1293.m3416("No view found for id 0x");
                                r2.append(Integer.toHexString(fragment.mContainerId));
                                r2.append(" (");
                                r2.append(str);
                                r2.append(") for fragment ");
                                r2.append(fragment);
                                m4039(new IllegalArgumentException(r2.toString()));
                                throw null;
                            }
                        } else {
                            m4039(new IllegalArgumentException(C1293.m3411("Cannot create fragment ", fragment, " for a container view with no id")));
                            throw null;
                        }
                        fragment.mContainer = viewGroup2;
                        fragment.performCreateView(fragment.performGetLayoutInflater(fragment.mSavedFragmentState), viewGroup2, fragment.mSavedFragmentState);
                        View view = fragment.mView;
                        if (view != null) {
                            fragment.mInnerView = view;
                            view.setSaveFromParentEnabled(false);
                            if (viewGroup2 != null) {
                                viewGroup2.addView(fragment.mView);
                            }
                            if (fragment.mHidden) {
                                fragment.mView.setVisibility(8);
                            }
                            fragment.onViewCreated(fragment.mView, fragment.mSavedFragmentState);
                            m4036(fragment, fragment.mView, fragment.mSavedFragmentState, false);
                            if (fragment.mView.getVisibility() != 0 || fragment.mContainer == null) {
                                z2 = false;
                            }
                            fragment.mIsNewlyAdded = z2;
                        } else {
                            fragment.mInnerView = null;
                        }
                    }
                    fragment.performActivityCreated(fragment.mSavedFragmentState);
                    m4035(fragment, fragment.mSavedFragmentState, false);
                    if (fragment.mView != null) {
                        fragment.restoreViewState(fragment.mSavedFragmentState);
                    }
                    fragment.mSavedFragmentState = null;
                }
                if (i8 > 2) {
                }
                if (i8 > 3) {
                }
            } else {
                return;
            }
        } else if (i9 > i8) {
            if (i9 != 1) {
                if (i9 != 2) {
                    if (i9 != 3) {
                        if (i9 == 4) {
                            if (i8 < 4) {
                                fragment.performPause();
                                m4073(fragment, false);
                            }
                        }
                    }
                    if (i8 < 3) {
                        fragment.performStop();
                        m4018(fragment, false);
                    }
                }
                if (i8 < 2) {
                    if (fragment.mView != null && (!FragmentActivity.this.isFinishing()) && fragment.mSavedViewState == null) {
                        m4079(fragment);
                    }
                    fragment.performDestroyView();
                    m4077(fragment, false);
                    View view2 = fragment.mView;
                    if (!(view2 == null || (viewGroup = fragment.mContainer) == null)) {
                        viewGroup.endViewTransition(view2);
                        fragment.mView.clearAnimation();
                        if (fragment.getParentFragment() == null || !fragment.getParentFragment().mRemoving) {
                            C1547 r03 = (this.f5658 <= 0 || this.f5655 || fragment.mView.getVisibility() != 0 || fragment.mPostponedAlpha < 0.0f) ? null : m4022(fragment, i2, false, i3);
                            fragment.mPostponedAlpha = 0.0f;
                            if (r03 != null) {
                                View view3 = fragment.mView;
                                ViewGroup viewGroup3 = fragment.mContainer;
                                viewGroup3.startViewTransition(view3);
                                fragment.setStateAfterAnimating(i8);
                                Animation animation = r03.f5683;
                                if (animation != null) {
                                    RunnableC1554 r04 = new RunnableC1554(animation, viewGroup3, view3);
                                    fragment.setAnimatingAway(fragment.mView);
                                    r04.setAnimationListener(new animation.Animation$AnimationListenerC1527(this, viewGroup3, fragment));
                                    fragment.mView.startAnimation(r04);
                                } else {
                                    Animator animator = r03.f5682;
                                    fragment.setAnimator(animator);
                                    animator.addListener(new C1540(this, viewGroup3, view3, fragment));
                                    animator.setTarget(fragment.mView);
                                    animator.start();
                                }
                            }
                            fragment.mContainer.removeView(fragment.mView);
                        }
                    }
                    fragment.mContainer = null;
                    fragment.mView = null;
                    fragment.mViewLifecycleOwner = null;
                    fragment.mViewLifecycleOwnerLiveData.m4127((AbstractC1574) null);
                    fragment.mInnerView = null;
                    fragment.mInLayout = false;
                }
            }
            if (i8 < 1) {
                if (this.f5655) {
                    if (fragment.getAnimatingAway() != null) {
                        View animatingAway = fragment.getAnimatingAway();
                        fragment.setAnimatingAway(null);
                        animatingAway.clearAnimation();
                    } else if (fragment.getAnimator() != null) {
                        Animator animator2 = fragment.getAnimator();
                        fragment.setAnimator(null);
                        animator2.cancel();
                    }
                }
                if (fragment.getAnimatingAway() == null && fragment.getAnimator() == null) {
                    boolean z4 = fragment.mRemoving && !fragment.isInBackStack();
                    if (z4 || this.f5654.m3907(fragment)) {
                        AbstractC1542 r1 = this.f5668;
                        if (r1 instanceof AbstractC1586) {
                            z3 = this.f5654.m3909();
                        } else {
                            Context context = r1.f5638;
                            if (context instanceof Activity) {
                                z3 = true ^ ((Activity) context).isChangingConfigurations();
                            }
                        }
                        if (z4 || z3) {
                            this.f5654.m3905(fragment);
                        }
                        fragment.performDestroy();
                        m4010(fragment, false);
                    } else {
                        fragment.mState = 0;
                    }
                    fragment.performDetach();
                    m3978(fragment, false);
                    if (!z) {
                        if (z4 || this.f5654.m3907(fragment)) {
                            m4081(fragment);
                        } else {
                            fragment.mHost = null;
                            fragment.mParentFragment = null;
                            fragment.mFragmentManager = null;
                            String str3 = fragment.mTargetWho;
                            if (!(str3 == null || (fragment2 = this.f5675.get(str3)) == null || !fragment2.getRetainInstance())) {
                                fragment.mTarget = fragment2;
                            }
                        }
                    }
                } else {
                    fragment.setStateAfterAnimating(i8);
                    if (fragment.mState == i7) {
                        Log.w("FragmentManager", "moveToState: Fragment state for " + fragment + " not updated inline; expected state " + i7 + " found " + fragment.mState);
                        fragment.mState = i7;
                        return;
                    }
                    return;
                }
            }
        }
        i7 = i8;
        if (fragment.mState == i7) {
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m4027(int i, boolean z) {
        AbstractC1542 r3;
        if (this.f5668 == null && i != 0) {
            throw new IllegalStateException("No activity");
        } else if (z || i != this.f5658) {
            this.f5658 = i;
            int size = this.f5662.size();
            for (int i2 = 0; i2 < size; i2++) {
                m3982(this.f5662.get(i2));
            }
            for (Fragment fragment : this.f5675.values()) {
                if (fragment != null && ((fragment.mRemoving || fragment.mDetached) && !fragment.mIsNewlyAdded)) {
                    m3982(fragment);
                }
            }
            m3993();
            if (this.f5673 && (r3 = this.f5668) != null && this.f5658 == 4) {
                FragmentActivity.this.supportInvalidateOptionsMenu();
                this.f5673 = false;
            }
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m4038(Fragment fragment, boolean z) {
        m4056(fragment);
        if (fragment.mDetached) {
            return;
        }
        if (!this.f5662.contains(fragment)) {
            synchronized (this.f5662) {
                this.f5662.add(fragment);
            }
            fragment.mAdded = true;
            fragment.mRemoving = false;
            if (fragment.mView == null) {
                fragment.mHiddenChanged = false;
            }
            if (m4063(fragment)) {
                this.f5673 = true;
            }
            if (z) {
                m4058(fragment);
                return;
            }
            return;
        }
        throw new IllegalStateException("Fragment already added: " + fragment);
    }

    @Override // ῲ.Ԕ.K.AbstractC1531
    /* renamed from: K  reason: contains not printable characters */
    public Fragment m4021(String str) {
        if (str != null) {
            for (int size = this.f5662.size() - 1; size >= 0; size--) {
                Fragment fragment = this.f5662.get(size);
                if (fragment != null && str.equals(fragment.mTag)) {
                    return fragment;
                }
            }
        }
        if (str == null) {
            return null;
        }
        for (Fragment fragment2 : this.f5675.values()) {
            if (fragment2 != null && str.equals(fragment2.mTag)) {
                return fragment2;
            }
        }
        return null;
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m4046(AbstractC1549 r2, boolean z) {
        if (!z) {
            m4076();
        }
        synchronized (this) {
            if (!this.f5655) {
                if (this.f5668 != null) {
                    if (this.f5674 == null) {
                        this.f5674 = new ArrayList<>();
                    }
                    this.f5674.add(r2);
                    m4052();
                    return;
                }
            }
            if (!z) {
                throw new IllegalStateException("Activity has been destroyed");
            }
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m4026(int i, C1535 k) {
        synchronized (this) {
            if (this.f5677 == null) {
                this.f5677 = new ArrayList<>();
            }
            int size = this.f5677.size();
            if (i < size) {
                this.f5677.set(i, k);
            } else {
                while (size < i) {
                    this.f5677.add(null);
                    if (this.f5648 == null) {
                        this.f5648 = new ArrayList<>();
                    }
                    this.f5648.add(Integer.valueOf(size));
                    size++;
                }
                this.f5677.add(k);
            }
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public final void m4041(ArrayList<C1535> arrayList, ArrayList<Boolean> arrayList2) {
        int indexOf;
        int indexOf2;
        ArrayList<C1548> arrayList3 = this.f5663;
        int size = arrayList3 == null ? 0 : arrayList3.size();
        int i = 0;
        while (i < size) {
            C1548 r3 = this.f5663.get(i);
            if (arrayList == null || r3.f5686 || (indexOf2 = arrayList.indexOf(r3.f5685)) == -1 || !arrayList2.get(indexOf2).booleanValue()) {
                if ((r3.f5684 == 0) || (arrayList != null && r3.f5685.m3940(arrayList, 0, arrayList.size()))) {
                    this.f5663.remove(i);
                    i--;
                    size--;
                    if (arrayList == null || r3.f5686 || (indexOf = arrayList.indexOf(r3.f5685)) == -1 || !arrayList2.get(indexOf).booleanValue()) {
                        r3.m4083();
                    } else {
                        C1535 k = r3.f5685;
                        k.f5610.m4044(k, r3.f5686, false, false);
                    }
                }
            } else {
                this.f5663.remove(i);
                i--;
                size--;
                C1535 k2 = r3.f5685;
                k2.f5610.m4044(k2, r3.f5686, false, false);
            }
            i++;
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public final void m4042(ArrayList<C1535> arrayList, ArrayList<Boolean> arrayList2, int i, int i2) {
        int i3;
        int i4;
        int i5 = i;
        boolean z = arrayList.get(i5).f5709;
        ArrayList<Fragment> arrayList3 = this.f5678;
        if (arrayList3 == null) {
            this.f5678 = new ArrayList<>();
        } else {
            arrayList3.clear();
        }
        this.f5678.addAll(this.f5662);
        Fragment r1 = m3994();
        boolean z2 = false;
        for (int i6 = i5; i6 < i2; i6++) {
            C1535 k = arrayList.get(i6);
            if (!arrayList2.get(i6).booleanValue()) {
                r1 = k.m3934(this.f5678, r1);
            } else {
                r1 = k.m3927(this.f5678, r1);
            }
            z2 = z2 || k.f5722;
        }
        this.f5678.clear();
        if (!z) {
            C1538.m3969(this, arrayList, arrayList2, i, i2, false);
        }
        int i7 = i5;
        while (i7 < i2) {
            C1535 k2 = arrayList.get(i7);
            if (arrayList2.get(i7).booleanValue()) {
                k2.m3936(-1);
                k2.m3929(i7 == i2 + -1);
            } else {
                k2.m3936(1);
                k2.m3942();
            }
            i7++;
        }
        if (z) {
            C2274<Fragment> r0 = new C2274<>();
            m4047(r0);
            int i8 = i2;
            for (int i9 = i2 - 1; i9 >= i5; i9--) {
                C1535 k3 = arrayList.get(i9);
                boolean booleanValue = arrayList2.get(i9).booleanValue();
                if (k3.m3945() && !k3.m3940(arrayList, i9 + 1, i2)) {
                    if (this.f5663 == null) {
                        this.f5663 = new ArrayList<>();
                    }
                    C1548 r5 = new C1548(k3, booleanValue);
                    this.f5663.add(r5);
                    k3.setOnStartPostponedListener(r5);
                    if (booleanValue) {
                        k3.m3942();
                    } else {
                        k3.m3929(false);
                    }
                    i8--;
                    if (i9 != i8) {
                        arrayList.remove(i9);
                        arrayList.add(i8, k3);
                    }
                    m4047(r0);
                }
            }
            int i10 = r0.f7864;
            for (int i11 = 0; i11 < i10; i11++) {
                Fragment fragment = (Fragment) r0.f7861[i11];
                if (!fragment.mAdded) {
                    View requireView = fragment.requireView();
                    fragment.mPostponedAlpha = requireView.getAlpha();
                    requireView.setAlpha(0.0f);
                }
            }
            i3 = i8;
        } else {
            i3 = i2;
        }
        if (i3 != i5 && z) {
            C1538.m3969(this, arrayList, arrayList2, i, i3, true);
            m4027(this.f5658, true);
        }
        while (i5 < i2) {
            C1535 k4 = arrayList.get(i5);
            if (arrayList2.get(i5).booleanValue() && (i4 = k4.f5611) >= 0) {
                m3975(i4);
                k4.f5611 = -1;
            }
            k4.m3925();
            i5++;
        }
        if (z2) {
            m4001();
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m4044(C1535 k, boolean z, boolean z2, boolean z3) {
        if (z) {
            k.m3929(z3);
        } else {
            k.m3942();
        }
        ArrayList arrayList = new ArrayList(1);
        ArrayList arrayList2 = new ArrayList(1);
        arrayList.add(k);
        arrayList2.add(Boolean.valueOf(z));
        if (z2) {
            C1538.m3969(this, (ArrayList<C1535>) arrayList, (ArrayList<Boolean>) arrayList2, 0, 1, true);
        }
        if (z3) {
            m4027(this.f5658, true);
        }
        for (Fragment fragment : this.f5675.values()) {
            if (fragment != null && fragment.mView != null && fragment.mIsNewlyAdded && k.m3930(fragment.mContainerId)) {
                float f = fragment.mPostponedAlpha;
                if (f > 0.0f) {
                    fragment.mView.setAlpha(f);
                }
                if (z3) {
                    fragment.mPostponedAlpha = 0.0f;
                } else {
                    fragment.mPostponedAlpha = -1.0f;
                    fragment.mIsNewlyAdded = false;
                }
            }
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public final void m4047(C2274<Fragment> r11) {
        int i = this.f5658;
        if (i >= 1) {
            int min = Math.min(i, 3);
            int size = this.f5662.size();
            for (int i2 = 0; i2 < size; i2++) {
                Fragment fragment = this.f5662.get(i2);
                if (fragment.mState < min) {
                    m4033(fragment, min, fragment.getNextAnim(), fragment.getNextTransition(), false);
                    if (fragment.mView != null && !fragment.mHidden && fragment.mIsNewlyAdded) {
                        r11.add(fragment);
                    }
                }
            }
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m4043(C1535 k) {
        if (this.f5661 == null) {
            this.f5661 = new ArrayList<>();
        }
        this.f5661.add(k);
    }

    /* renamed from: K  reason: contains not printable characters */
    public boolean m4051(ArrayList<C1535> arrayList, ArrayList<Boolean> arrayList2, String str, int i, int i2) {
        int i3;
        ArrayList<C1535> arrayList3 = this.f5661;
        if (arrayList3 == null) {
            return false;
        }
        if (str == null && i < 0 && (i2 & 1) == 0) {
            int size = arrayList3.size() - 1;
            if (size < 0) {
                return false;
            }
            arrayList.add(this.f5661.remove(size));
            arrayList2.add(true);
        } else {
            if (str != null || i >= 0) {
                i3 = this.f5661.size() - 1;
                while (i3 >= 0) {
                    C1535 k = this.f5661.get(i3);
                    if ((str != null && str.equals(k.m3931())) || (i >= 0 && i == k.f5611)) {
                        break;
                    }
                    i3--;
                }
                if (i3 < 0) {
                    return false;
                }
                if ((i2 & 1) != 0) {
                    while (true) {
                        i3--;
                        if (i3 < 0) {
                            break;
                        }
                        C1535 k2 = this.f5661.get(i3);
                        if ((str == null || !str.equals(k2.m3931())) && (i < 0 || i != k2.f5611)) {
                            break;
                        }
                    }
                }
            } else {
                i3 = -1;
            }
            if (i3 == this.f5661.size() - 1) {
                return false;
            }
            for (int size2 = this.f5661.size() - 1; size2 > i3; size2--) {
                arrayList.add(this.f5661.remove(size2));
                arrayList2.add(true);
            }
        }
        return true;
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m4030(Parcelable parcelable) {
        int i;
        FragmentState fragmentState;
        if (parcelable != null) {
            FragmentManagerState fragmentManagerState = (FragmentManagerState) parcelable;
            if (fragmentManagerState.f1300 != null) {
                Iterator<Fragment> it2 = this.f5654.m3901().iterator();
                while (true) {
                    i = 0;
                    if (!it2.hasNext()) {
                        break;
                    }
                    Fragment next = it2.next();
                    Iterator<FragmentState> it3 = fragmentManagerState.f1300.iterator();
                    while (true) {
                        if (!it3.hasNext()) {
                            fragmentState = null;
                            break;
                        }
                        fragmentState = it3.next();
                        if (fragmentState.f1303.equals(next.mWho)) {
                            break;
                        }
                    }
                    if (fragmentState == null) {
                        m4033(next, 1, 0, 0, false);
                        next.mRemoving = true;
                        m4033(next, 0, 0, 0, false);
                    } else {
                        fragmentState.f1311 = next;
                        next.mSavedViewState = null;
                        next.mBackStackNesting = 0;
                        next.mInLayout = false;
                        next.mAdded = false;
                        Fragment fragment = next.mTarget;
                        next.mTargetWho = fragment != null ? fragment.mWho : null;
                        next.mTarget = null;
                        Bundle bundle = fragmentState.f1304;
                        if (bundle != null) {
                            bundle.setClassLoader(this.f5668.f5638.getClassLoader());
                            next.mSavedViewState = fragmentState.f1304.getSparseParcelableArray("android:view_state");
                            next.mSavedFragmentState = fragmentState.f1304;
                        }
                    }
                }
                this.f5675.clear();
                Iterator<FragmentState> it4 = fragmentManagerState.f1300.iterator();
                while (it4.hasNext()) {
                    FragmentState next2 = it4.next();
                    if (next2 != null) {
                        Fragment r5 = next2.m684(this.f5668.f5638.getClassLoader(), m3974());
                        r5.mFragmentManager = this;
                        this.f5675.put(r5.mWho, r5);
                        next2.f1311 = null;
                    }
                }
                this.f5662.clear();
                ArrayList<String> arrayList = fragmentManagerState.f1298;
                if (arrayList != null) {
                    Iterator<String> it5 = arrayList.iterator();
                    while (it5.hasNext()) {
                        String next3 = it5.next();
                        Fragment fragment2 = this.f5675.get(next3);
                        if (fragment2 != null) {
                            fragment2.mAdded = true;
                            if (!this.f5662.contains(fragment2)) {
                                synchronized (this.f5662) {
                                    this.f5662.add(fragment2);
                                }
                            } else {
                                throw new IllegalStateException("Already added " + fragment2);
                            }
                        } else {
                            m4039(new IllegalStateException(C1293.m3413("No instantiated fragment for (", next3, ")")));
                            throw null;
                        }
                    }
                }
                BackStackState[] backStackStateArr = fragmentManagerState.f1302;
                if (backStackStateArr != null) {
                    this.f5661 = new ArrayList<>(backStackStateArr.length);
                    while (true) {
                        BackStackState[] backStackStateArr2 = fragmentManagerState.f1302;
                        if (i >= backStackStateArr2.length) {
                            break;
                        }
                        C1535 r0 = backStackStateArr2[i].m678(this);
                        this.f5661.add(r0);
                        int i2 = r0.f5611;
                        if (i2 >= 0) {
                            m4026(i2, r0);
                        }
                        i++;
                    }
                } else {
                    this.f5661 = null;
                }
                String str = fragmentManagerState.f1299;
                if (str != null) {
                    this.f5649 = this.f5675.get(str);
                    m3989(this.f5649);
                }
                this.f5672 = fragmentManagerState.f1301;
            }
        }
    }

    /* JADX DEBUG: Multi-variable search result rejected for r5v13, resolved type: ῲ.K.ʬ */
    /* JADX WARN: Multi-variable type inference failed */
    /* renamed from: K  reason: contains not printable characters */
    public void m4045(AbstractC1542 r4, AbstractC1513 r5, Fragment fragment) {
        AbstractC1567 r52;
        if (this.f5668 == null) {
            this.f5668 = r4;
            this.f5651 = r5;
            this.f5676 = fragment;
            if (this.f5676 != null) {
                m3995();
            }
            if (r4 instanceof AbstractC2195) {
                AbstractC2195 r53 = (AbstractC2195) r4;
                this.f5659 = r53.getOnBackPressedDispatcher();
                Fragment fragment2 = r53;
                if (fragment != null) {
                    fragment2 = fragment;
                }
                this.f5659.m122(fragment2, this.f5666);
            }
            if (fragment != null) {
                this.f5654 = fragment.mFragmentManager.m4017(fragment);
            } else if (r4 instanceof AbstractC1586) {
                C1568 viewModelStore = ((AbstractC1586) r4).getViewModelStore();
                AbstractC1570 r54 = C1525.f5595;
                String canonicalName = C1525.class.getCanonicalName();
                if (canonicalName != null) {
                    String str = "androidx.lifecycle.ViewModelProvider.DefaultKey:" + canonicalName;
                    AbstractC1567 r1 = viewModelStore.f5739.get(str);
                    if (!C1525.class.isInstance(r1)) {
                        if (r54 instanceof AbstractC1580) {
                            r52 = ((AbstractC1580) r54).m4132(str, C1525.class);
                        } else {
                            r52 = r54.m4114(C1525.class);
                        }
                        r1 = r52;
                        AbstractC1567 put = viewModelStore.f5739.put(str, r1);
                        if (put != null) {
                            put.m4110();
                        }
                    }
                    this.f5654 = (C1525) r1;
                    return;
                }
                throw new IllegalArgumentException("Local and anonymous classes can not be ViewModels");
            } else {
                this.f5654 = new C1525(false);
            }
        } else {
            throw new IllegalStateException("Already attached");
        }
    }

    /* JADX INFO: finally extract failed */
    /* renamed from: K  reason: contains not printable characters */
    public final void m4024(int i) {
        try {
            this.f5652 = true;
            m4027(i, false);
            this.f5652 = false;
            m3984();
        } catch (Throwable th) {
            this.f5652 = false;
            throw th;
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m4048(boolean z) {
        for (int size = this.f5662.size() - 1; size >= 0; size--) {
            Fragment fragment = this.f5662.get(size);
            if (fragment != null) {
                fragment.performMultiWindowModeChanged(z);
            }
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m4028(Configuration configuration) {
        for (int i = 0; i < this.f5662.size(); i++) {
            Fragment fragment = this.f5662.get(i);
            if (fragment != null) {
                fragment.performConfigurationChanged(configuration);
            }
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public boolean m4049(Menu menu, MenuInflater menuInflater) {
        if (this.f5658 < 1) {
            return false;
        }
        ArrayList<Fragment> arrayList = null;
        boolean z = false;
        for (int i = 0; i < this.f5662.size(); i++) {
            Fragment fragment = this.f5662.get(i);
            if (fragment != null && fragment.performCreateOptionsMenu(menu, menuInflater)) {
                if (arrayList == null) {
                    arrayList = new ArrayList<>();
                }
                arrayList.add(fragment);
                z = true;
            }
        }
        if (this.f5670 != null) {
            for (int i2 = 0; i2 < this.f5670.size(); i2++) {
                Fragment fragment2 = this.f5670.get(i2);
                if (arrayList == null || !arrayList.contains(fragment2)) {
                    fragment2.onDestroyOptionsMenu();
                }
            }
        }
        this.f5670 = arrayList;
        return z;
    }

    /* renamed from: K  reason: contains not printable characters */
    public boolean m4050(MenuItem menuItem) {
        if (this.f5658 < 1) {
            return false;
        }
        for (int i = 0; i < this.f5662.size(); i++) {
            Fragment fragment = this.f5662.get(i);
            if (fragment != null && fragment.performContextItemSelected(menuItem)) {
                return true;
            }
        }
        return false;
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m4031(Menu menu) {
        if (this.f5658 >= 1) {
            for (int i = 0; i < this.f5662.size(); i++) {
                Fragment fragment = this.f5662.get(i);
                if (fragment != null) {
                    fragment.performOptionsMenuClosed(menu);
                }
            }
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m4037(Fragment fragment, Lifecycle.State state) {
        if (this.f5675.get(fragment.mWho) == fragment && (fragment.mHost == null || fragment.getFragmentManager() == this)) {
            fragment.mMaxState = state;
            return;
        }
        throw new IllegalArgumentException("Fragment " + fragment + " is not an active fragment of FragmentManager " + this);
    }

    /* JADX WARNING: Removed duplicated region for block: B:8:0x001e  */
    /* renamed from: K  reason: contains not printable characters */
    public void m4034(Fragment fragment, Context context, boolean z) {
        Fragment fragment2 = this.f5676;
        if (fragment2 != null) {
            AbstractC1531 fragmentManager = fragment2.getFragmentManager();
            if (fragmentManager instanceof LayoutInflater$Factory2C1545) {
                ((LayoutInflater$Factory2C1545) fragmentManager).m4034(fragment, context, true);
            }
        }
        Iterator<C1551> it2 = this.f5650.iterator();
        while (it2.hasNext()) {
            C1551 next = it2.next();
            if (!z || next.f5688) {
                AbstractC1531.AbstractC1533 r3 = next.f5689;
                throw null;
            }
            while (it2.hasNext()) {
            }
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:8:0x001e  */
    /* renamed from: K  reason: contains not printable characters */
    public void m4035(Fragment fragment, Bundle bundle, boolean z) {
        Fragment fragment2 = this.f5676;
        if (fragment2 != null) {
            AbstractC1531 fragmentManager = fragment2.getFragmentManager();
            if (fragmentManager instanceof LayoutInflater$Factory2C1545) {
                ((LayoutInflater$Factory2C1545) fragmentManager).m4035(fragment, bundle, true);
            }
        }
        Iterator<C1551> it2 = this.f5650.iterator();
        while (it2.hasNext()) {
            C1551 next = it2.next();
            if (!z || next.f5688) {
                AbstractC1531.AbstractC1533 r3 = next.f5689;
                throw null;
            }
            while (it2.hasNext()) {
            }
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:8:0x001e  */
    /* renamed from: K  reason: contains not printable characters */
    public void m4036(Fragment fragment, View view, Bundle bundle, boolean z) {
        Fragment fragment2 = this.f5676;
        if (fragment2 != null) {
            AbstractC1531 fragmentManager = fragment2.getFragmentManager();
            if (fragmentManager instanceof LayoutInflater$Factory2C1545) {
                ((LayoutInflater$Factory2C1545) fragmentManager).m4036(fragment, view, bundle, true);
            }
        }
        Iterator<C1551> it2 = this.f5650.iterator();
        while (it2.hasNext()) {
            C1551 next = it2.next();
            if (!z || next.f5688) {
                AbstractC1531.AbstractC1533 r3 = next.f5689;
                throw null;
            }
            while (it2.hasNext()) {
            }
        }
    }
}
