package androidx.fragment.app;

import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import java.util.ArrayList;
import o.C1938nC;
import o.C2487t1;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class b implements Parcelable {
    public static final Parcelable.Creator<b> CREATOR = new C2487t1(2);
    public final int[] l;
    public final ArrayList m;
    public final int[] n;

    /* renamed from: o, reason: collision with root package name */
    public final int[] f16o;
    public final int p;
    public final String q;
    public final int r;
    public final int s;
    public final CharSequence t;
    public final int u;
    public final CharSequence v;
    public final ArrayList w;
    public final ArrayList x;
    public final boolean y;

    public b(a aVar) {
        int size = aVar.a.size();
        this.l = new int[size * 6];
        if (!aVar.g) {
            throw new IllegalStateException("Not on back stack");
        }
        this.m = new ArrayList(size);
        this.n = new int[size];
        this.f16o = new int[size];
        int i = 0;
        for (int i2 = 0; i2 < size; i2++) {
            C1938nC c1938nC = (C1938nC) aVar.a.get(i2);
            int i3 = i + 1;
            this.l[i] = c1938nC.a;
            ArrayList arrayList = this.m;
            l lVar = c1938nC.b;
            arrayList.add(lVar != null ? lVar.mWho : null);
            int[] iArr = this.l;
            iArr[i3] = c1938nC.c ? 1 : 0;
            iArr[i + 2] = c1938nC.d;
            iArr[i + 3] = c1938nC.e;
            int i4 = i + 5;
            iArr[i + 4] = c1938nC.f;
            i += 6;
            iArr[i4] = c1938nC.g;
            this.n[i2] = c1938nC.h.ordinal();
            this.f16o[i2] = c1938nC.i.ordinal();
        }
        this.p = aVar.f;
        this.q = aVar.h;
        this.r = aVar.r;
        this.s = aVar.i;
        this.t = aVar.j;
        this.u = aVar.k;
        this.v = aVar.l;
        this.w = aVar.m;
        this.x = aVar.n;
        this.y = aVar.f660o;
    }

    @Override // android.os.Parcelable
    public final int describeContents() {
        return 0;
    }

    @Override // android.os.Parcelable
    public final void writeToParcel(Parcel parcel, int i) {
        parcel.writeIntArray(this.l);
        parcel.writeStringList(this.m);
        parcel.writeIntArray(this.n);
        parcel.writeIntArray(this.f16o);
        parcel.writeInt(this.p);
        parcel.writeString(this.q);
        parcel.writeInt(this.r);
        parcel.writeInt(this.s);
        TextUtils.writeToParcel(this.t, parcel, 0);
        parcel.writeInt(this.u);
        TextUtils.writeToParcel(this.v, parcel, 0);
        parcel.writeStringList(this.w);
        parcel.writeStringList(this.x);
        parcel.writeInt(this.y ? 1 : 0);
    }

    public b(Parcel parcel) {
        this.l = parcel.createIntArray();
        this.m = parcel.createStringArrayList();
        this.n = parcel.createIntArray();
        this.f16o = parcel.createIntArray();
        this.p = parcel.readInt();
        this.q = parcel.readString();
        this.r = parcel.readInt();
        this.s = parcel.readInt();
        Parcelable.Creator creator = TextUtils.CHAR_SEQUENCE_CREATOR;
        this.t = (CharSequence) creator.createFromParcel(parcel);
        this.u = parcel.readInt();
        this.v = (CharSequence) creator.createFromParcel(parcel);
        this.w = parcel.createStringArrayList();
        this.x = parcel.createStringArrayList();
        this.y = parcel.readInt() != 0;
    }
}
