package androidx.fragment.app; import android.view.ViewGroup; import androidx.lifecycle.e; import java.lang.reflect.Modifier; import java.util.ArrayList; /* loaded from: classes.dex */ public abstract class v { /* renamed from: a, reason: collision with root package name */ private final j f1932a; /* renamed from: b, reason: collision with root package name */ private final ClassLoader f1933b; /* renamed from: d, reason: collision with root package name */ int f1935d; /* renamed from: e, reason: collision with root package name */ int f1936e; /* renamed from: f, reason: collision with root package name */ int f1937f; /* renamed from: g, reason: collision with root package name */ int f1938g; /* renamed from: h, reason: collision with root package name */ int f1939h; /* renamed from: i, reason: collision with root package name */ boolean f1940i; /* renamed from: k, reason: collision with root package name */ String f1942k; /* renamed from: l, reason: collision with root package name */ int f1943l; /* renamed from: m, reason: collision with root package name */ CharSequence f1944m; /* renamed from: n, reason: collision with root package name */ int f1945n; /* renamed from: o, reason: collision with root package name */ CharSequence f1946o; /* renamed from: p, reason: collision with root package name */ ArrayList f1947p; /* renamed from: q, reason: collision with root package name */ ArrayList f1948q; /* renamed from: s, reason: collision with root package name */ ArrayList f1950s; /* renamed from: c, reason: collision with root package name */ ArrayList f1934c = new ArrayList(); /* renamed from: j, reason: collision with root package name */ boolean f1941j = true; /* renamed from: r, reason: collision with root package name */ boolean f1949r = false; static final class a { /* renamed from: a, reason: collision with root package name */ int f1951a; /* renamed from: b, reason: collision with root package name */ Fragment f1952b; /* renamed from: c, reason: collision with root package name */ int f1953c; /* renamed from: d, reason: collision with root package name */ int f1954d; /* renamed from: e, reason: collision with root package name */ int f1955e; /* renamed from: f, reason: collision with root package name */ int f1956f; /* renamed from: g, reason: collision with root package name */ e.c f1957g; /* renamed from: h, reason: collision with root package name */ e.c f1958h; a() { } a(int i10, Fragment fragment) { this.f1951a = i10; this.f1952b = fragment; e.c cVar = e.c.RESUMED; this.f1957g = cVar; this.f1958h = cVar; } } v(j jVar, ClassLoader classLoader) { this.f1932a = jVar; this.f1933b = classLoader; } public v b(int i10, Fragment fragment, String str) { k(i10, fragment, str, 1); return this; } v c(ViewGroup viewGroup, Fragment fragment, String str) { fragment.mContainer = viewGroup; return b(viewGroup.getId(), fragment, str); } public v d(Fragment fragment, String str) { k(0, fragment, str, 1); return this; } void e(a aVar) { this.f1934c.add(aVar); aVar.f1953c = this.f1935d; aVar.f1954d = this.f1936e; aVar.f1955e = this.f1937f; aVar.f1956f = this.f1938g; } public abstract int f(); public abstract int g(); public abstract void h(); public abstract void i(); public v j() { if (this.f1940i) { throw new IllegalStateException("This transaction is already being added to the back stack"); } this.f1941j = false; return this; } void k(int i10, Fragment fragment, String str, int i11) { Class cls = fragment.getClass(); int modifiers = cls.getModifiers(); if (cls.isAnonymousClass() || !Modifier.isPublic(modifiers) || (cls.isMemberClass() && !Modifier.isStatic(modifiers))) { throw new IllegalStateException("Fragment " + cls.getCanonicalName() + " must be a public static class to be properly recreated from instance state."); } if (str != null) { String str2 = fragment.mTag; if (str2 != null && !str.equals(str2)) { throw new IllegalStateException("Can't change tag of fragment " + fragment + ": was " + fragment.mTag + " now " + str); } fragment.mTag = str; } if (i10 != 0) { if (i10 == -1) { throw new IllegalArgumentException("Can't add fragment " + fragment + " with tag " + str + " to container view with no id"); } int i12 = fragment.mFragmentId; if (i12 != 0 && i12 != i10) { throw new IllegalStateException("Can't change container ID of fragment " + fragment + ": was " + fragment.mFragmentId + " now " + i10); } fragment.mFragmentId = i10; fragment.mContainerId = i10; } e(new a(i11, fragment)); } public v l(Fragment fragment) { e(new a(3, fragment)); return this; } public v m(int i10, Fragment fragment) { return n(i10, fragment, null); } public v n(int i10, Fragment fragment, String str) { if (i10 == 0) { throw new IllegalArgumentException("Must use non-zero containerViewId"); } k(i10, fragment, str, 2); return this; } public v o(boolean z10) { this.f1949r = z10; return this; } }