APK反编译源代码展示 - 南明离火平台提供

应用版本信息
应用名称:Cuto
版本号:2.6.10
包名称:com.sspai.cuto.android

MD5 校验值:9a3607a8b6a643c932183399cb0ea25c

反编译源代码说明

L.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。


package G1;

import G1.ComponentCallbacksC0547p;
import G1.X;
import G5.C0563g;
import H1.a;
import K1.a;
import N1.a;
import android.app.Activity;
import android.content.Context;
import android.content.res.Resources;
import android.os.Bundle;
import android.os.Parcelable;
import android.util.AndroidRuntimeException;
import android.util.Log;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import androidx.fragment.app.FragmentContainerView;
import androidx.lifecycle.AbstractC0823k;
import androidx.lifecycle.C0830s;
import com.sspai.cuto.android.R;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.WeakHashMap;
import q1.J;
import s.C1761B;

public final class L {

    public final C f3155a;

    public final W0.c f3156b;

    public final ComponentCallbacksC0547p f3157c;

    public boolean f3158d = false;

    public int f3159e = -1;

    public class a implements View.OnAttachStateChangeListener {

        public final View f3160h;

        public a(View view) {
            this.f3160h = view;
        }

        @Override
        public final void onViewAttachedToWindow(View view) {
            View view2 = this.f3160h;
            view2.removeOnAttachStateChangeListener(this);
            WeakHashMap<View, q1.U> weakHashMap = q1.J.f18323a;
            J.c.c(view2);
        }

        @Override
        public final void onViewDetachedFromWindow(View view) {
        }
    }

    public L(C c8, W0.c cVar, ComponentCallbacksC0547p componentCallbacksC0547p) {
        this.f3155a = c8;
        this.f3156b = cVar;
        this.f3157c = componentCallbacksC0547p;
    }

    public final void a() {
        boolean isLoggable = Log.isLoggable("FragmentManager", 3);
        ComponentCallbacksC0547p componentCallbacksC0547p = this.f3157c;
        if (isLoggable) {
            Log.d("FragmentManager", "moveto ACTIVITY_CREATED: " + componentCallbacksC0547p);
        }
        Bundle bundle = componentCallbacksC0547p.f3347i;
        componentCallbacksC0547p.f3318A.N();
        componentCallbacksC0547p.f3346h = 3;
        componentCallbacksC0547p.f3327J = false;
        componentCallbacksC0547p.C();
        if (!componentCallbacksC0547p.f3327J) {
            throw new AndroidRuntimeException(C0548q.d("Fragment ", componentCallbacksC0547p, " did not call through to super.onActivityCreated()"));
        }
        if (Log.isLoggable("FragmentManager", 3)) {
            Log.d("FragmentManager", "moveto RESTORE_VIEW_STATE: " + componentCallbacksC0547p);
        }
        View view = componentCallbacksC0547p.f3329L;
        if (view != null) {
            Bundle bundle2 = componentCallbacksC0547p.f3347i;
            SparseArray<Parcelable> sparseArray = componentCallbacksC0547p.f3348j;
            if (sparseArray != null) {
                view.restoreHierarchyState(sparseArray);
                componentCallbacksC0547p.f3348j = null;
            }
            if (componentCallbacksC0547p.f3329L != null) {
                componentCallbacksC0547p.f3339V.f3209l.b(componentCallbacksC0547p.f3349k);
                componentCallbacksC0547p.f3349k = null;
            }
            componentCallbacksC0547p.f3327J = false;
            componentCallbacksC0547p.S(bundle2);
            if (!componentCallbacksC0547p.f3327J) {
                throw new AndroidRuntimeException(C0548q.d("Fragment ", componentCallbacksC0547p, " did not call through to super.onViewStateRestored()"));
            }
            if (componentCallbacksC0547p.f3329L != null) {
                componentCallbacksC0547p.f3339V.b(AbstractC0823k.a.ON_CREATE);
            }
        }
        componentCallbacksC0547p.f3347i = null;
        G g8 = componentCallbacksC0547p.f3318A;
        g8.f3079F = false;
        g8.f3080G = false;
        g8.f3086M.f3141g = false;
        g8.t(4);
        this.f3155a.a(false);
    }

    public final void b() {
        View view;
        View view2;
        W0.c cVar = this.f3156b;
        cVar.getClass();
        ComponentCallbacksC0547p componentCallbacksC0547p = this.f3157c;
        ViewGroup viewGroup = componentCallbacksC0547p.f3328K;
        int i8 = -1;
        if (viewGroup != null) {
            int indexOf = ((ArrayList) cVar.f8858a).indexOf(componentCallbacksC0547p);
            int i9 = indexOf - 1;
            while (true) {
                if (i9 < 0) {
                    while (true) {
                        indexOf++;
                        if (indexOf >= ((ArrayList) cVar.f8858a).size()) {
                            break;
                        }
                        ComponentCallbacksC0547p componentCallbacksC0547p2 = (ComponentCallbacksC0547p) ((ArrayList) cVar.f8858a).get(indexOf);
                        if (componentCallbacksC0547p2.f3328K == viewGroup && (view = componentCallbacksC0547p2.f3329L) != null) {
                            i8 = viewGroup.indexOfChild(view);
                            break;
                        }
                    }
                } else {
                    ComponentCallbacksC0547p componentCallbacksC0547p3 = (ComponentCallbacksC0547p) ((ArrayList) cVar.f8858a).get(i9);
                    if (componentCallbacksC0547p3.f3328K == viewGroup && (view2 = componentCallbacksC0547p3.f3329L) != null) {
                        i8 = viewGroup.indexOfChild(view2) + 1;
                        break;
                    }
                    i9--;
                }
            }
        }
        componentCallbacksC0547p.f3328K.addView(componentCallbacksC0547p.f3329L, i8);
    }

    public final void c() {
        boolean isLoggable = Log.isLoggable("FragmentManager", 3);
        ComponentCallbacksC0547p componentCallbacksC0547p = this.f3157c;
        if (isLoggable) {
            Log.d("FragmentManager", "moveto ATTACHED: " + componentCallbacksC0547p);
        }
        ComponentCallbacksC0547p componentCallbacksC0547p2 = componentCallbacksC0547p.f3352n;
        L l7 = null;
        W0.c cVar = this.f3156b;
        if (componentCallbacksC0547p2 != null) {
            L l8 = (L) ((HashMap) cVar.f8859b).get(componentCallbacksC0547p2.f3350l);
            if (l8 == null) {
                throw new IllegalStateException("Fragment " + componentCallbacksC0547p + " declared target fragment " + componentCallbacksC0547p.f3352n + " that does not belong to this FragmentManager!");
            }
            componentCallbacksC0547p.f3353o = componentCallbacksC0547p.f3352n.f3350l;
            componentCallbacksC0547p.f3352n = null;
            l7 = l8;
        } else {
            String str = componentCallbacksC0547p.f3353o;
            if (str != null && (l7 = (L) ((HashMap) cVar.f8859b).get(str)) == null) {
                StringBuilder sb = new StringBuilder("Fragment ");
                sb.append(componentCallbacksC0547p);
                sb.append(" declared target fragment ");
                throw new IllegalStateException(C0563g.g(sb, componentCallbacksC0547p.f3353o, " that does not belong to this FragmentManager!"));
            }
        }
        if (l7 != null) {
            l7.k();
        }
        F f8 = componentCallbacksC0547p.f3363y;
        componentCallbacksC0547p.f3364z = f8.f3108u;
        componentCallbacksC0547p.f3319B = f8.f3110w;
        C c8 = this.f3155a;
        c8.g(false);
        ArrayList<ComponentCallbacksC0547p.e> arrayList = componentCallbacksC0547p.f3344a0;
        Iterator<ComponentCallbacksC0547p.e> it = arrayList.iterator();
        while (it.hasNext()) {
            it.next().a();
        }
        arrayList.clear();
        componentCallbacksC0547p.f3318A.b(componentCallbacksC0547p.f3364z, componentCallbacksC0547p.k(), componentCallbacksC0547p);
        componentCallbacksC0547p.f3346h = 0;
        componentCallbacksC0547p.f3327J = false;
        componentCallbacksC0547p.F(componentCallbacksC0547p.f3364z.f3063j);
        if (!componentCallbacksC0547p.f3327J) {
            throw new AndroidRuntimeException(C0548q.d("Fragment ", componentCallbacksC0547p, " did not call through to super.onAttach()"));
        }
        Iterator<J> it2 = componentCallbacksC0547p.f3363y.f3101n.iterator();
        while (it2.hasNext()) {
            it2.next().g();
        }
        G g8 = componentCallbacksC0547p.f3318A;
        g8.f3079F = false;
        g8.f3080G = false;
        g8.f3086M.f3141g = false;
        g8.t(0);
        c8.b(false);
    }

    public final int d() {
        ComponentCallbacksC0547p componentCallbacksC0547p = this.f3157c;
        if (componentCallbacksC0547p.f3363y == null) {
            return componentCallbacksC0547p.f3346h;
        }
        int i8 = this.f3159e;
        int ordinal = componentCallbacksC0547p.f3337T.ordinal();
        if (ordinal == 1) {
            i8 = Math.min(i8, 0);
        } else if (ordinal == 2) {
            i8 = Math.min(i8, 1);
        } else if (ordinal == 3) {
            i8 = Math.min(i8, 5);
        } else if (ordinal != 4) {
            i8 = Math.min(i8, -1);
        }
        if (componentCallbacksC0547p.f3358t) {
            if (componentCallbacksC0547p.f3359u) {
                i8 = Math.max(this.f3159e, 2);
                View view = componentCallbacksC0547p.f3329L;
                if (view != null && view.getParent() == null) {
                    i8 = Math.min(i8, 2);
                }
            } else {
                i8 = this.f3159e < 4 ? Math.min(i8, componentCallbacksC0547p.f3346h) : Math.min(i8, 1);
            }
        }
        if (!componentCallbacksC0547p.f3356r) {
            i8 = Math.min(i8, 1);
        }
        ViewGroup viewGroup = componentCallbacksC0547p.f3328K;
        X.d dVar = null;
        if (viewGroup != null) {
            X f8 = X.f(viewGroup, componentCallbacksC0547p.r().F());
            f8.getClass();
            X.d d8 = f8.d(componentCallbacksC0547p);
            X.d dVar2 = d8 != null ? d8.f3223b : null;
            Iterator<X.d> it = f8.f3214c.iterator();
            while (true) {
                if (!it.hasNext()) {
                    break;
                }
                X.d next = it.next();
                if (next.f3224c.equals(componentCallbacksC0547p) && !next.f3227f) {
                    dVar = next;
                    break;
                }
            }
            dVar = (dVar == null || !(dVar2 == null || dVar2 == X.d.b.f3230h)) ? dVar2 : dVar.f3223b;
        }
        if (dVar == X.d.b.f3231i) {
            i8 = Math.min(i8, 6);
        } else if (dVar == X.d.b.f3232j) {
            i8 = Math.max(i8, 3);
        } else if (componentCallbacksC0547p.f3357s) {
            i8 = componentCallbacksC0547p.B() ? Math.min(i8, 1) : Math.min(i8, -1);
        }
        if (componentCallbacksC0547p.f3330M && componentCallbacksC0547p.f3346h < 5) {
            i8 = Math.min(i8, 4);
        }
        if (Log.isLoggable("FragmentManager", 2)) {
            Log.v("FragmentManager", "computeExpectedState() of " + i8 + " for " + componentCallbacksC0547p);
        }
        return i8;
    }

    public final void e() {
        Parcelable parcelable;
        boolean isLoggable = Log.isLoggable("FragmentManager", 3);
        ComponentCallbacksC0547p componentCallbacksC0547p = this.f3157c;
        if (isLoggable) {
            Log.d("FragmentManager", "moveto CREATED: " + componentCallbacksC0547p);
        }
        if (componentCallbacksC0547p.f3335R) {
            Bundle bundle = componentCallbacksC0547p.f3347i;
            if (bundle != null && (parcelable = bundle.getParcelable("android:support:fragments")) != null) {
                componentCallbacksC0547p.f3318A.T(parcelable);
                G g8 = componentCallbacksC0547p.f3318A;
                g8.f3079F = false;
                g8.f3080G = false;
                g8.f3086M.f3141g = false;
                g8.t(1);
            }
            componentCallbacksC0547p.f3346h = 1;
            return;
        }
        C c8 = this.f3155a;
        c8.h(false);
        Bundle bundle2 = componentCallbacksC0547p.f3347i;
        componentCallbacksC0547p.f3318A.N();
        componentCallbacksC0547p.f3346h = 1;
        componentCallbacksC0547p.f3327J = false;
        componentCallbacksC0547p.f3338U.a(new r(componentCallbacksC0547p));
        componentCallbacksC0547p.f3342Y.b(bundle2);
        componentCallbacksC0547p.G(bundle2);
        componentCallbacksC0547p.f3335R = true;
        if (!componentCallbacksC0547p.f3327J) {
            throw new AndroidRuntimeException(C0548q.d("Fragment ", componentCallbacksC0547p, " did not call through to super.onCreate()"));
        }
        componentCallbacksC0547p.f3338U.f(AbstractC0823k.a.ON_CREATE);
        c8.c(false);
    }

    public final void f() {
        String str;
        ComponentCallbacksC0547p componentCallbacksC0547p = this.f3157c;
        if (componentCallbacksC0547p.f3358t) {
            return;
        }
        if (Log.isLoggable("FragmentManager", 3)) {
            Log.d("FragmentManager", "moveto CREATE_VIEW: " + componentCallbacksC0547p);
        }
        LayoutInflater L7 = componentCallbacksC0547p.L(componentCallbacksC0547p.f3347i);
        componentCallbacksC0547p.f3334Q = L7;
        ViewGroup viewGroup = componentCallbacksC0547p.f3328K;
        if (viewGroup == null) {
            int i8 = componentCallbacksC0547p.f3321D;
            if (i8 == 0) {
                viewGroup = null;
            } else {
                if (i8 == -1) {
                    throw new IllegalArgumentException(C0548q.d("Cannot create fragment ", componentCallbacksC0547p, " for a container view with no id"));
                }
                viewGroup = (ViewGroup) componentCallbacksC0547p.f3363y.f3109v.A(i8);
                if (viewGroup == null) {
                    if (!componentCallbacksC0547p.f3360v) {
                        try {
                            str = componentCallbacksC0547p.s().getResourceName(componentCallbacksC0547p.f3321D);
                        } catch (Resources.NotFoundException unused) {
                            str = "unknown";
                        }
                        throw new IllegalArgumentException("No view found for id 0x" + Integer.toHexString(componentCallbacksC0547p.f3321D) + " (" + str + ") for fragment " + componentCallbacksC0547p);
                    }
                } else if (!(viewGroup instanceof FragmentContainerView)) {
                    a.b bVar = H1.a.f3577a;
                    H1.a.b(new H1.b(componentCallbacksC0547p, viewGroup, 1));
                    H1.a.a(componentCallbacksC0547p).getClass();
                    Object obj = a.EnumC0048a.f3581k;
                    if (obj instanceof Void) {
                    }
                }
            }
        }
        componentCallbacksC0547p.f3328K = viewGroup;
        componentCallbacksC0547p.T(L7, viewGroup, componentCallbacksC0547p.f3347i);
        View view = componentCallbacksC0547p.f3329L;
        if (view != null) {
            view.setSaveFromParentEnabled(false);
            componentCallbacksC0547p.f3329L.setTag(R.id.fragment_container_view_tag, componentCallbacksC0547p);
            if (viewGroup != null) {
                b();
            }
            if (componentCallbacksC0547p.f3323F) {
                componentCallbacksC0547p.f3329L.setVisibility(8);
            }
            View view2 = componentCallbacksC0547p.f3329L;
            WeakHashMap<View, q1.U> weakHashMap = q1.J.f18323a;
            if (view2.isAttachedToWindow()) {
                J.c.c(componentCallbacksC0547p.f3329L);
            } else {
                View view3 = componentCallbacksC0547p.f3329L;
                view3.addOnAttachStateChangeListener(new a(view3));
            }
            componentCallbacksC0547p.R(componentCallbacksC0547p.f3329L, componentCallbacksC0547p.f3347i);
            componentCallbacksC0547p.f3318A.t(2);
            this.f3155a.m(false);
            int visibility = componentCallbacksC0547p.f3329L.getVisibility();
            componentCallbacksC0547p.m().f3378l = componentCallbacksC0547p.f3329L.getAlpha();
            if (componentCallbacksC0547p.f3328K != null && visibility == 0) {
                View findFocus = componentCallbacksC0547p.f3329L.findFocus();
                if (findFocus != null) {
                    componentCallbacksC0547p.m().f3379m = findFocus;
                    if (Log.isLoggable("FragmentManager", 2)) {
                        Log.v("FragmentManager", "requestFocus: Saved focused view " + findFocus + " for Fragment " + componentCallbacksC0547p);
                    }
                }
                componentCallbacksC0547p.f3329L.setAlpha(0.0f);
            }
        }
        componentCallbacksC0547p.f3346h = 2;
    }

    public final void g() {
        ComponentCallbacksC0547p b8;
        boolean isLoggable = Log.isLoggable("FragmentManager", 3);
        ComponentCallbacksC0547p componentCallbacksC0547p = this.f3157c;
        if (isLoggable) {
            Log.d("FragmentManager", "movefrom CREATED: " + componentCallbacksC0547p);
        }
        boolean z7 = true;
        boolean z8 = componentCallbacksC0547p.f3357s && !componentCallbacksC0547p.B();
        W0.c cVar = this.f3156b;
        if (z8) {
            cVar.j(componentCallbacksC0547p.f3350l, null);
        }
        if (!z8) {
            I i8 = (I) cVar.f8861d;
            if (i8.f3136b.containsKey(componentCallbacksC0547p.f3350l) && i8.f3139e && !i8.f3140f) {
                String str = componentCallbacksC0547p.f3353o;
                if (str != null && (b8 = cVar.b(str)) != null && b8.f3325H) {
                    componentCallbacksC0547p.f3352n = b8;
                }
                componentCallbacksC0547p.f3346h = 0;
                return;
            }
        }
        A<?> a8 = componentCallbacksC0547p.f3364z;
        if (a8 instanceof androidx.lifecycle.Y) {
            z7 = ((I) cVar.f8861d).f3140f;
        } else {
            Context context = a8.f3063j;
            if (context instanceof Activity) {
                z7 = true ^ ((Activity) context).isChangingConfigurations();
            }
        }
        if (z8 || z7) {
            ((I) cVar.f8861d).f(componentCallbacksC0547p);
        }
        componentCallbacksC0547p.f3318A.k();
        componentCallbacksC0547p.f3338U.f(AbstractC0823k.a.ON_DESTROY);
        componentCallbacksC0547p.f3346h = 0;
        componentCallbacksC0547p.f3327J = false;
        componentCallbacksC0547p.f3335R = false;
        componentCallbacksC0547p.I();
        if (!componentCallbacksC0547p.f3327J) {
            throw new AndroidRuntimeException(C0548q.d("Fragment ", componentCallbacksC0547p, " did not call through to super.onDestroy()"));
        }
        this.f3155a.d(false);
        Iterator it = cVar.d().iterator();
        while (it.hasNext()) {
            L l7 = (L) it.next();
            if (l7 != null) {
                String str2 = componentCallbacksC0547p.f3350l;
                ComponentCallbacksC0547p componentCallbacksC0547p2 = l7.f3157c;
                if (str2.equals(componentCallbacksC0547p2.f3353o)) {
                    componentCallbacksC0547p2.f3352n = componentCallbacksC0547p;
                    componentCallbacksC0547p2.f3353o = null;
                }
            }
        }
        String str3 = componentCallbacksC0547p.f3353o;
        if (str3 != null) {
            componentCallbacksC0547p.f3352n = cVar.b(str3);
        }
        cVar.h(this);
    }

    public final void h() {
        View view;
        boolean isLoggable = Log.isLoggable("FragmentManager", 3);
        ComponentCallbacksC0547p componentCallbacksC0547p = this.f3157c;
        if (isLoggable) {
            Log.d("FragmentManager", "movefrom CREATE_VIEW: " + componentCallbacksC0547p);
        }
        ViewGroup viewGroup = componentCallbacksC0547p.f3328K;
        if (viewGroup != null && (view = componentCallbacksC0547p.f3329L) != null) {
            viewGroup.removeView(view);
        }
        componentCallbacksC0547p.f3318A.t(1);
        if (componentCallbacksC0547p.f3329L != null) {
            V v7 = componentCallbacksC0547p.f3339V;
            v7.d();
            if (v7.f3208k.f11641d.compareTo(AbstractC0823k.b.f11630j) >= 0) {
                componentCallbacksC0547p.f3339V.b(AbstractC0823k.a.ON_DESTROY);
            }
        }
        componentCallbacksC0547p.f3346h = 1;
        componentCallbacksC0547p.f3327J = false;
        componentCallbacksC0547p.J();
        if (!componentCallbacksC0547p.f3327J) {
            throw new AndroidRuntimeException(C0548q.d("Fragment ", componentCallbacksC0547p, " did not call through to super.onDestroyView()"));
        }
        androidx.lifecycle.X store = componentCallbacksC0547p.t();
        kotlin.jvm.internal.l.f(store, "store");
        a.b.C0071a factory = a.b.f5999c;
        kotlin.jvm.internal.l.f(factory, "factory");
        a.C0060a defaultCreationExtras = a.C0060a.f4361b;
        kotlin.jvm.internal.l.f(defaultCreationExtras, "defaultCreationExtras");
        K1.c cVar = new K1.c(store, factory, defaultCreationExtras);
        kotlin.jvm.internal.d a8 = kotlin.jvm.internal.y.a(a.b.class);
        String a9 = a8.a();
        if (a9 == null) {
            throw new IllegalArgumentException("Local and anonymous classes can not be ViewModels".toString());
        }
        C1761B<a.C0070a> c1761b = ((a.b) cVar.a("androidx.lifecycle.ViewModelProvider.DefaultKey:".concat(a9), a8)).f6000b;
        int f8 = c1761b.f();
        for (int i8 = 0; i8 < f8; i8++) {
            c1761b.i(i8).getClass();
        }
        componentCallbacksC0547p.f3361w = false;
        this.f3155a.n(false);
        componentCallbacksC0547p.f3328K = null;
        componentCallbacksC0547p.f3329L = null;
        componentCallbacksC0547p.f3339V = null;
        componentCallbacksC0547p.f3340W.k(null);
        componentCallbacksC0547p.f3359u = false;
    }

    public final void i() {
        boolean isLoggable = Log.isLoggable("FragmentManager", 3);
        ComponentCallbacksC0547p componentCallbacksC0547p = this.f3157c;
        if (isLoggable) {
            Log.d("FragmentManager", "movefrom ATTACHED: " + componentCallbacksC0547p);
        }
        componentCallbacksC0547p.f3346h = -1;
        componentCallbacksC0547p.f3327J = false;
        componentCallbacksC0547p.K();
        componentCallbacksC0547p.f3334Q = null;
        if (!componentCallbacksC0547p.f3327J) {
            throw new AndroidRuntimeException(C0548q.d("Fragment ", componentCallbacksC0547p, " did not call through to super.onDetach()"));
        }
        G g8 = componentCallbacksC0547p.f3318A;
        if (!g8.f3081H) {
            g8.k();
            componentCallbacksC0547p.f3318A = new F();
        }
        this.f3155a.e(false);
        componentCallbacksC0547p.f3346h = -1;
        componentCallbacksC0547p.f3364z = null;
        componentCallbacksC0547p.f3319B = null;
        componentCallbacksC0547p.f3363y = null;
        if (!componentCallbacksC0547p.f3357s || componentCallbacksC0547p.B()) {
            I i8 = (I) this.f3156b.f8861d;
            if (i8.f3136b.containsKey(componentCallbacksC0547p.f3350l) && i8.f3139e && !i8.f3140f) {
                return;
            }
        }
        if (Log.isLoggable("FragmentManager", 3)) {
            Log.d("FragmentManager", "initState called for fragment: " + componentCallbacksC0547p);
        }
        componentCallbacksC0547p.y();
    }

    public final void j() {
        ComponentCallbacksC0547p componentCallbacksC0547p = this.f3157c;
        if (componentCallbacksC0547p.f3358t && componentCallbacksC0547p.f3359u && !componentCallbacksC0547p.f3361w) {
            if (Log.isLoggable("FragmentManager", 3)) {
                Log.d("FragmentManager", "moveto CREATE_VIEW: " + componentCallbacksC0547p);
            }
            LayoutInflater L7 = componentCallbacksC0547p.L(componentCallbacksC0547p.f3347i);
            componentCallbacksC0547p.f3334Q = L7;
            componentCallbacksC0547p.T(L7, null, componentCallbacksC0547p.f3347i);
            View view = componentCallbacksC0547p.f3329L;
            if (view != null) {
                view.setSaveFromParentEnabled(false);
                componentCallbacksC0547p.f3329L.setTag(R.id.fragment_container_view_tag, componentCallbacksC0547p);
                if (componentCallbacksC0547p.f3323F) {
                    componentCallbacksC0547p.f3329L.setVisibility(8);
                }
                componentCallbacksC0547p.R(componentCallbacksC0547p.f3329L, componentCallbacksC0547p.f3347i);
                componentCallbacksC0547p.f3318A.t(2);
                this.f3155a.m(false);
                componentCallbacksC0547p.f3346h = 2;
            }
        }
    }

    public final void k() {
        ViewGroup viewGroup;
        ViewGroup viewGroup2;
        ViewGroup viewGroup3;
        W0.c cVar = this.f3156b;
        boolean z7 = this.f3158d;
        ComponentCallbacksC0547p componentCallbacksC0547p = this.f3157c;
        if (z7) {
            if (Log.isLoggable("FragmentManager", 2)) {
                Log.v("FragmentManager", "Ignoring re-entrant call to moveToExpectedState() for " + componentCallbacksC0547p);
                return;
            }
            return;
        }
        try {
            this.f3158d = true;
            boolean z8 = false;
            while (true) {
                int d8 = d();
                int i8 = componentCallbacksC0547p.f3346h;
                if (d8 == i8) {
                    if (!z8 && i8 == -1 && componentCallbacksC0547p.f3357s && !componentCallbacksC0547p.B()) {
                        if (Log.isLoggable("FragmentManager", 3)) {
                            Log.d("FragmentManager", "Cleaning up state of never attached fragment: " + componentCallbacksC0547p);
                        }
                        ((I) cVar.f8861d).f(componentCallbacksC0547p);
                        cVar.h(this);
                        if (Log.isLoggable("FragmentManager", 3)) {
                            Log.d("FragmentManager", "initState called for fragment: " + componentCallbacksC0547p);
                        }
                        componentCallbacksC0547p.y();
                    }
                    if (componentCallbacksC0547p.f3333P) {
                        if (componentCallbacksC0547p.f3329L != null && (viewGroup = componentCallbacksC0547p.f3328K) != null) {
                            X f8 = X.f(viewGroup, componentCallbacksC0547p.r().F());
                            boolean z9 = componentCallbacksC0547p.f3323F;
                            X.d.b bVar = X.d.b.f3230h;
                            if (z9) {
                                f8.getClass();
                                if (Log.isLoggable("FragmentManager", 2)) {
                                    Log.v("FragmentManager", "SpecialEffectsController: Enqueuing hide operation for fragment " + componentCallbacksC0547p);
                                }
                                f8.a(X.d.c.f3236j, bVar, this);
                            } else {
                                f8.getClass();
                                if (Log.isLoggable("FragmentManager", 2)) {
                                    Log.v("FragmentManager", "SpecialEffectsController: Enqueuing show operation for fragment " + componentCallbacksC0547p);
                                }
                                f8.a(X.d.c.f3235i, bVar, this);
                            }
                        }
                        F f9 = componentCallbacksC0547p.f3363y;
                        if (f9 != null && componentCallbacksC0547p.f3356r && F.H(componentCallbacksC0547p)) {
                            f9.f3078E = true;
                        }
                        componentCallbacksC0547p.f3333P = false;
                        componentCallbacksC0547p.f3318A.n();
                    }
                    this.f3158d = false;
                    return;
                }
                if (d8 <= i8) {
                    switch (i8 - 1) {
                        case -1:
                            i();
                            break;
                        case 0:
                            g();
                            break;
                        case 1:
                            h();
                            componentCallbacksC0547p.f3346h = 1;
                            break;
                        case 2:
                            componentCallbacksC0547p.f3359u = false;
                            componentCallbacksC0547p.f3346h = 2;
                            break;
                        case 3:
                            if (Log.isLoggable("FragmentManager", 3)) {
                                Log.d("FragmentManager", "movefrom ACTIVITY_CREATED: " + componentCallbacksC0547p);
                            }
                            if (componentCallbacksC0547p.f3329L != null && componentCallbacksC0547p.f3348j == null) {
                                p();
                            }
                            if (componentCallbacksC0547p.f3329L != null && (viewGroup2 = componentCallbacksC0547p.f3328K) != null) {
                                X f10 = X.f(viewGroup2, componentCallbacksC0547p.r().F());
                                f10.getClass();
                                if (Log.isLoggable("FragmentManager", 2)) {
                                    Log.v("FragmentManager", "SpecialEffectsController: Enqueuing remove operation for fragment " + componentCallbacksC0547p);
                                }
                                f10.a(X.d.c.f3234h, X.d.b.f3232j, this);
                            }
                            componentCallbacksC0547p.f3346h = 3;
                            break;
                        case 4:
                            r();
                            break;
                        case 5:
                            componentCallbacksC0547p.f3346h = 5;
                            break;
                        case 6:
                            l();
                            break;
                    }
                } else {
                    switch (i8 + 1) {
                        case 0:
                            c();
                            break;
                        case 1:
                            e();
                            break;
                        case 2:
                            j();
                            f();
                            break;
                        case 3:
                            a();
                            break;
                        case 4:
                            if (componentCallbacksC0547p.f3329L != null && (viewGroup3 = componentCallbacksC0547p.f3328K) != null) {
                                X f11 = X.f(viewGroup3, componentCallbacksC0547p.r().F());
                                X.d.c c8 = X.d.c.c(componentCallbacksC0547p.f3329L.getVisibility());
                                f11.getClass();
                                if (Log.isLoggable("FragmentManager", 2)) {
                                    Log.v("FragmentManager", "SpecialEffectsController: Enqueuing add operation for fragment " + componentCallbacksC0547p);
                                }
                                f11.a(c8, X.d.b.f3231i, this);
                            }
                            componentCallbacksC0547p.f3346h = 4;
                            break;
                        case 5:
                            q();
                            break;
                        case 6:
                            componentCallbacksC0547p.f3346h = 6;
                            break;
                        case 7:
                            n();
                            break;
                    }
                }
                z8 = true;
            }
        } catch (Throwable th) {
            this.f3158d = false;
            throw th;
        }
    }

    public final void l() {
        boolean isLoggable = Log.isLoggable("FragmentManager", 3);
        ComponentCallbacksC0547p componentCallbacksC0547p = this.f3157c;
        if (isLoggable) {
            Log.d("FragmentManager", "movefrom RESUMED: " + componentCallbacksC0547p);
        }
        componentCallbacksC0547p.f3318A.t(5);
        if (componentCallbacksC0547p.f3329L != null) {
            componentCallbacksC0547p.f3339V.b(AbstractC0823k.a.ON_PAUSE);
        }
        componentCallbacksC0547p.f3338U.f(AbstractC0823k.a.ON_PAUSE);
        componentCallbacksC0547p.f3346h = 6;
        componentCallbacksC0547p.f3327J = false;
        componentCallbacksC0547p.M();
        if (!componentCallbacksC0547p.f3327J) {
            throw new AndroidRuntimeException(C0548q.d("Fragment ", componentCallbacksC0547p, " did not call through to super.onPause()"));
        }
        this.f3155a.f(false);
    }

    public final void m(ClassLoader classLoader) {
        ComponentCallbacksC0547p componentCallbacksC0547p = this.f3157c;
        Bundle bundle = componentCallbacksC0547p.f3347i;
        if (bundle == null) {
            return;
        }
        bundle.setClassLoader(classLoader);
        componentCallbacksC0547p.f3348j = componentCallbacksC0547p.f3347i.getSparseParcelableArray("android:view_state");
        componentCallbacksC0547p.f3349k = componentCallbacksC0547p.f3347i.getBundle("android:view_registry_state");
        String string = componentCallbacksC0547p.f3347i.getString("android:target_state");
        componentCallbacksC0547p.f3353o = string;
        if (string != null) {
            componentCallbacksC0547p.f3354p = componentCallbacksC0547p.f3347i.getInt("android:target_req_state", 0);
        }
        boolean z7 = componentCallbacksC0547p.f3347i.getBoolean("android:user_visible_hint", true);
        componentCallbacksC0547p.f3331N = z7;
        if (z7) {
            return;
        }
        componentCallbacksC0547p.f3330M = true;
    }

    public final void n() {
        boolean isLoggable = Log.isLoggable("FragmentManager", 3);
        ComponentCallbacksC0547p componentCallbacksC0547p = this.f3157c;
        if (isLoggable) {
            Log.d("FragmentManager", "moveto RESUMED: " + componentCallbacksC0547p);
        }
        ComponentCallbacksC0547p.c cVar = componentCallbacksC0547p.f3332O;
        View view = cVar == null ? null : cVar.f3379m;
        if (view != null) {
            if (view != componentCallbacksC0547p.f3329L) {
                for (ViewParent parent = view.getParent(); parent != null; parent = parent.getParent()) {
                    if (parent != componentCallbacksC0547p.f3329L) {
                    }
                }
            }
            boolean requestFocus = view.requestFocus();
            if (Log.isLoggable("FragmentManager", 2)) {
                StringBuilder sb = new StringBuilder("requestFocus: Restoring focused view ");
                sb.append(view);
                sb.append(" ");
                sb.append(requestFocus ? "succeeded" : "failed");
                sb.append(" on Fragment ");
                sb.append(componentCallbacksC0547p);
                sb.append(" resulting in focused view ");
                sb.append(componentCallbacksC0547p.f3329L.findFocus());
                Log.v("FragmentManager", sb.toString());
            }
        }
        componentCallbacksC0547p.m().f3379m = null;
        componentCallbacksC0547p.f3318A.N();
        componentCallbacksC0547p.f3318A.y(true);
        componentCallbacksC0547p.f3346h = 7;
        componentCallbacksC0547p.f3327J = false;
        componentCallbacksC0547p.N();
        if (!componentCallbacksC0547p.f3327J) {
            throw new AndroidRuntimeException(C0548q.d("Fragment ", componentCallbacksC0547p, " did not call through to super.onResume()"));
        }
        C0830s c0830s = componentCallbacksC0547p.f3338U;
        AbstractC0823k.a aVar = AbstractC0823k.a.ON_RESUME;
        c0830s.f(aVar);
        if (componentCallbacksC0547p.f3329L != null) {
            componentCallbacksC0547p.f3339V.f3208k.f(aVar);
        }
        G g8 = componentCallbacksC0547p.f3318A;
        g8.f3079F = false;
        g8.f3080G = false;
        g8.f3086M.f3141g = false;
        g8.t(7);
        this.f3155a.i(false);
        componentCallbacksC0547p.f3347i = null;
        componentCallbacksC0547p.f3348j = null;
        componentCallbacksC0547p.f3349k = null;
    }

    public final void o() {
        ComponentCallbacksC0547p componentCallbacksC0547p = this.f3157c;
        K k7 = new K(componentCallbacksC0547p);
        if (componentCallbacksC0547p.f3346h <= -1 || k7.f3154t != null) {
            k7.f3154t = componentCallbacksC0547p.f3347i;
        } else {
            Bundle bundle = new Bundle();
            componentCallbacksC0547p.O(bundle);
            componentCallbacksC0547p.f3342Y.c(bundle);
            bundle.putParcelable("android:support:fragments", componentCallbacksC0547p.f3318A.U());
            this.f3155a.j(false);
            if (bundle.isEmpty()) {
                bundle = null;
            }
            if (componentCallbacksC0547p.f3329L != null) {
                p();
            }
            if (componentCallbacksC0547p.f3348j != null) {
                if (bundle == null) {
                    bundle = new Bundle();
                }
                bundle.putSparseParcelableArray("android:view_state", componentCallbacksC0547p.f3348j);
            }
            if (componentCallbacksC0547p.f3349k != null) {
                if (bundle == null) {
                    bundle = new Bundle();
                }
                bundle.putBundle("android:view_registry_state", componentCallbacksC0547p.f3349k);
            }
            if (!componentCallbacksC0547p.f3331N) {
                if (bundle == null) {
                    bundle = new Bundle();
                }
                bundle.putBoolean("android:user_visible_hint", componentCallbacksC0547p.f3331N);
            }
            k7.f3154t = bundle;
            if (componentCallbacksC0547p.f3353o != null) {
                if (bundle == null) {
                    k7.f3154t = new Bundle();
                }
                k7.f3154t.putString("android:target_state", componentCallbacksC0547p.f3353o);
                int i8 = componentCallbacksC0547p.f3354p;
                if (i8 != 0) {
                    k7.f3154t.putInt("android:target_req_state", i8);
                }
            }
        }
        this.f3156b.j(componentCallbacksC0547p.f3350l, k7);
    }

    public final void p() {
        ComponentCallbacksC0547p componentCallbacksC0547p = this.f3157c;
        if (componentCallbacksC0547p.f3329L == null) {
            return;
        }
        if (Log.isLoggable("FragmentManager", 2)) {
            Log.v("FragmentManager", "Saving view state for fragment " + componentCallbacksC0547p + " with view " + componentCallbacksC0547p.f3329L);
        }
        SparseArray<Parcelable> sparseArray = new SparseArray<>();
        componentCallbacksC0547p.f3329L.saveHierarchyState(sparseArray);
        if (sparseArray.size() > 0) {
            componentCallbacksC0547p.f3348j = sparseArray;
        }
        Bundle bundle = new Bundle();
        componentCallbacksC0547p.f3339V.f3209l.c(bundle);
        if (bundle.isEmpty()) {
            return;
        }
        componentCallbacksC0547p.f3349k = bundle;
    }

    public final void q() {
        boolean isLoggable = Log.isLoggable("FragmentManager", 3);
        ComponentCallbacksC0547p componentCallbacksC0547p = this.f3157c;
        if (isLoggable) {
            Log.d("FragmentManager", "moveto STARTED: " + componentCallbacksC0547p);
        }
        componentCallbacksC0547p.f3318A.N();
        componentCallbacksC0547p.f3318A.y(true);
        componentCallbacksC0547p.f3346h = 5;
        componentCallbacksC0547p.f3327J = false;
        componentCallbacksC0547p.P();
        if (!componentCallbacksC0547p.f3327J) {
            throw new AndroidRuntimeException(C0548q.d("Fragment ", componentCallbacksC0547p, " did not call through to super.onStart()"));
        }
        C0830s c0830s = componentCallbacksC0547p.f3338U;
        AbstractC0823k.a aVar = AbstractC0823k.a.ON_START;
        c0830s.f(aVar);
        if (componentCallbacksC0547p.f3329L != null) {
            componentCallbacksC0547p.f3339V.f3208k.f(aVar);
        }
        G g8 = componentCallbacksC0547p.f3318A;
        g8.f3079F = false;
        g8.f3080G = false;
        g8.f3086M.f3141g = false;
        g8.t(5);
        this.f3155a.k(false);
    }

    public final void r() {
        boolean isLoggable = Log.isLoggable("FragmentManager", 3);
        ComponentCallbacksC0547p componentCallbacksC0547p = this.f3157c;
        if (isLoggable) {
            Log.d("FragmentManager", "movefrom STARTED: " + componentCallbacksC0547p);
        }
        G g8 = componentCallbacksC0547p.f3318A;
        g8.f3080G = true;
        g8.f3086M.f3141g = true;
        g8.t(4);
        if (componentCallbacksC0547p.f3329L != null) {
            componentCallbacksC0547p.f3339V.b(AbstractC0823k.a.ON_STOP);
        }
        componentCallbacksC0547p.f3338U.f(AbstractC0823k.a.ON_STOP);
        componentCallbacksC0547p.f3346h = 4;
        componentCallbacksC0547p.f3327J = false;
        componentCallbacksC0547p.Q();
        if (!componentCallbacksC0547p.f3327J) {
            throw new AndroidRuntimeException(C0548q.d("Fragment ", componentCallbacksC0547p, " did not call through to super.onStop()"));
        }
        this.f3155a.l(false);
    }

    public L(C c8, W0.c cVar, ClassLoader classLoader, C0556z c0556z, K k7) {
        this.f3155a = c8;
        this.f3156b = cVar;
        ComponentCallbacksC0547p a8 = c0556z.a(k7.f3142h);
        Bundle bundle = k7.f3151q;
        if (bundle != null) {
            bundle.setClassLoader(classLoader);
        }
        a8.Z(bundle);
        a8.f3350l = k7.f3143i;
        a8.f3358t = k7.f3144j;
        a8.f3360v = true;
        a8.f3320C = k7.f3145k;
        a8.f3321D = k7.f3146l;
        a8.f3322E = k7.f3147m;
        a8.f3325H = k7.f3148n;
        a8.f3357s = k7.f3149o;
        a8.f3324G = k7.f3150p;
        a8.f3323F = k7.f3152r;
        a8.f3337T = AbstractC0823k.b.values()[k7.f3153s];
        Bundle bundle2 = k7.f3154t;
        if (bundle2 != null) {
            a8.f3347i = bundle2;
        } else {
            a8.f3347i = new Bundle();
        }
        this.f3157c = a8;
        if (Log.isLoggable("FragmentManager", 2)) {
            Log.v("FragmentManager", "Instantiated fragment " + a8);
        }
    }

    public L(C c8, W0.c cVar, ComponentCallbacksC0547p componentCallbacksC0547p, K k7) {
        this.f3155a = c8;
        this.f3156b = cVar;
        this.f3157c = componentCallbacksC0547p;
        componentCallbacksC0547p.f3348j = null;
        componentCallbacksC0547p.f3349k = null;
        componentCallbacksC0547p.f3362x = 0;
        componentCallbacksC0547p.f3359u = false;
        componentCallbacksC0547p.f3356r = false;
        ComponentCallbacksC0547p componentCallbacksC0547p2 = componentCallbacksC0547p.f3352n;
        componentCallbacksC0547p.f3353o = componentCallbacksC0547p2 != null ? componentCallbacksC0547p2.f3350l : null;
        componentCallbacksC0547p.f3352n = null;
        Bundle bundle = k7.f3154t;
        if (bundle != null) {
            componentCallbacksC0547p.f3347i = bundle;
        } else {
            componentCallbacksC0547p.f3347i = new Bundle();
        }
    }
}