package androidx.fragment.app;

import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import d.C0507a;
import java.util.ArrayList;
import java.util.Iterator;
import r.C0966e;
import r4.AbstractC0983h;
import z0.AbstractC1147p;

/* JADX INFO: renamed from: androidx.fragment.app.n, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0282n extends D0 {

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final ArrayList f4319c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final E0 f4320d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final E0 f4321e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final z0 f4322f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public final Object f4323g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public final ArrayList f4324h;
    public final ArrayList i;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public final C0966e f4325j;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public final ArrayList f4326k;

    /* JADX INFO: renamed from: l, reason: collision with root package name */
    public final ArrayList f4327l;

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public final C0966e f4328m;

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public final C0966e f4329n;

    /* JADX INFO: renamed from: o, reason: collision with root package name */
    public final boolean f4330o;
    public final L.c p = new L.c();

    public C0282n(ArrayList arrayList, E0 e02, E0 e03, z0 z0Var, Object obj, ArrayList arrayList2, ArrayList arrayList3, C0966e c0966e, ArrayList arrayList4, ArrayList arrayList5, C0966e c0966e2, C0966e c0966e3, boolean z5) {
        this.f4319c = arrayList;
        this.f4320d = e02;
        this.f4321e = e03;
        this.f4322f = z0Var;
        this.f4323g = obj;
        this.f4324h = arrayList2;
        this.i = arrayList3;
        this.f4325j = c0966e;
        this.f4326k = arrayList4;
        this.f4327l = arrayList5;
        this.f4328m = c0966e2;
        this.f4329n = c0966e3;
        this.f4330o = z5;
    }

    public static void f(View view, ArrayList arrayList) {
        if (!(view instanceof ViewGroup)) {
            if (arrayList.contains(view)) {
                return;
            }
            arrayList.add(view);
            return;
        }
        ViewGroup viewGroup = (ViewGroup) view;
        int i = P.T.f2398a;
        if (viewGroup.isTransitionGroup()) {
            if (arrayList.contains(view)) {
                return;
            }
            arrayList.add(view);
            return;
        }
        int childCount = viewGroup.getChildCount();
        for (int i5 = 0; i5 < childCount; i5++) {
            View childAt = viewGroup.getChildAt(i5);
            if (childAt.getVisibility() == 0) {
                f(childAt, arrayList);
            }
        }
    }

    @Override // androidx.fragment.app.D0
    public final boolean a() {
        this.f4322f.i();
        return false;
    }

    @Override // androidx.fragment.app.D0
    public final void b(ViewGroup viewGroup) {
        AbstractC0983h.e("container", viewGroup);
        L.c cVar = this.p;
        synchronized (cVar) {
            try {
                if (cVar.f1245a) {
                    return;
                }
                cVar.f1245a = true;
                cVar.f1247c = true;
                k3.g gVar = cVar.f1246b;
                if (gVar != null) {
                    try {
                        ((AbstractC1147p) gVar.f8628k).d();
                    } catch (Throwable th) {
                        synchronized (cVar) {
                            cVar.f1247c = false;
                            cVar.notifyAll();
                            throw th;
                        }
                    }
                }
                synchronized (cVar) {
                    cVar.f1247c = false;
                    cVar.notifyAll();
                }
            } catch (Throwable th2) {
                throw th2;
            }
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:127:0x0285 A[SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:130:0x0271 A[SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:58:0x01e2  */
    /* JADX WARN: Removed duplicated region for block: B:67:0x0229  */
    @Override // androidx.fragment.app.D0
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct code enable 'Show inconsistent code' option in preferences
    */
    public final void c(android.view.ViewGroup r35) {
        /*
            Method dump skipped, instruction units count: 1139
            To view this dump change 'Code comments level' option to 'DEBUG'
        */
        throw new UnsupportedOperationException("Method not decompiled: androidx.fragment.app.C0282n.c(android.view.ViewGroup):void");
    }

    @Override // androidx.fragment.app.D0
    public final void d(C0507a c0507a, ViewGroup viewGroup) {
        AbstractC0983h.e("container", viewGroup);
    }

    @Override // androidx.fragment.app.D0
    public final void e(ViewGroup viewGroup) {
        boolean z5;
        Object obj;
        AbstractC0983h.e("container", viewGroup);
        boolean zIsLaidOut = viewGroup.isLaidOut();
        ArrayList arrayList = this.f4319c;
        if (!zIsLaidOut) {
            Iterator it = arrayList.iterator();
            while (it.hasNext()) {
                E0 e02 = ((C0283o) it.next()).f4309a;
                if (h0.J(2)) {
                    Log.v("FragmentManager", "SpecialEffectsController: Container " + viewGroup + " has not been laid out. Skipping onStart for operation " + e02);
                }
            }
            return;
        }
        ArrayList arrayList2 = this.f4319c;
        if (arrayList2.isEmpty()) {
            z5 = true;
        } else {
            Iterator it2 = arrayList2.iterator();
            while (it2.hasNext()) {
                if (!((C0283o) it2.next()).f4309a.f4150c.mTransitioning) {
                    z5 = false;
                    break;
                }
            }
            z5 = true;
        }
        if (z5 && (obj = this.f4323g) != null) {
            a();
            Log.i("FragmentManager", "Ignoring shared elements transition " + obj + " between " + this.f4320d + " and " + this.f4321e + " as neither fragment has set a Transition. In order to run a SharedElementTransition, you must also set either an enter or exit transition on a fragment involved in the transaction. The sharedElementTransition will run after the back gesture has been committed.");
        }
        a();
    }
}
