package o; import android.os.Parcel; import android.os.Parcelable; import android.text.TextUtils; import java.util.ArrayList; import o.AbstractC13482fbE; import o.wdQ; /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes.dex */ public final class FRM implements Parcelable { public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { // from class: o.FRM.1 @Override // android.os.Parcelable.Creator public final /* synthetic */ FRM createFromParcel(Parcel parcel) { return new FRM(parcel); } @Override // android.os.Parcelable.Creator public final /* bridge */ /* synthetic */ FRM[] newArray(int i) { return new FRM[i]; } }; final int[] a; final int b; final CharSequence c; final CharSequence d; final int e; final ArrayList f; final int g; final int[] h; final int[] i; final String j; final ArrayList k; final int l; final ArrayList n; /* renamed from: o, reason: collision with root package name */ final boolean f8162o; @Override // android.os.Parcelable public final int describeContents() { return 0; } /* JADX INFO: Access modifiers changed from: package-private */ public FRM(RlT rlT) { int size = rlT.k.size(); this.h = new int[size * 6]; if (!rlT.a) { throw new IllegalStateException("Not on back stack"); } this.f = new ArrayList<>(size); this.i = new int[size]; this.a = new int[size]; int i = 0; int i2 = 0; while (i2 < size) { AbstractC13482fbE.RVV rvv = rlT.k.get(i2); this.h[i] = rvv.e; this.f.add(rvv.d != null ? rvv.d.mWho : null); this.h[i + 1] = rvv.f ? 1 : 0; this.h[i + 2] = rvv.b; this.h[i + 3] = rvv.c; this.h[i + 4] = rvv.h; this.h[i + 5] = rvv.j; this.i[i2] = rvv.g.ordinal(); this.a[i2] = rvv.a.ordinal(); i2++; i += 6; } this.l = rlT.q; this.j = rlT.m; this.g = rlT.b; this.b = rlT.g; this.c = rlT.i; this.e = rlT.h; this.d = rlT.f; this.k = rlT.p; this.n = rlT.s; this.f8162o = rlT.r; } FRM(Parcel parcel) { this.h = parcel.createIntArray(); this.f = parcel.createStringArrayList(); this.i = parcel.createIntArray(); this.a = parcel.createIntArray(); this.l = parcel.readInt(); this.j = parcel.readString(); this.g = parcel.readInt(); this.b = parcel.readInt(); this.c = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel); this.e = parcel.readInt(); this.d = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel); this.k = parcel.createStringArrayList(); this.n = parcel.createStringArrayList(); this.f8162o = parcel.readInt() != 0; } public final RlT c(yRS yrs) { RlT rlT = new RlT(yrs); int i = 0; int i2 = 0; while (true) { boolean z = true; if (i >= this.h.length) { break; } AbstractC13482fbE.RVV rvv = new AbstractC13482fbE.RVV(); int i3 = i + 1; rvv.e = this.h[i]; if (yRS.b(2)) { int i4 = this.h[i3]; } rvv.g = wdQ.IeS.values()[this.i[i2]]; rvv.a = wdQ.IeS.values()[this.a[i2]]; if (this.h[i3] == 0) { z = false; } rvv.f = z; rvv.b = this.h[i + 2]; rvv.c = this.h[i + 3]; rvv.h = this.h[i + 4]; rvv.j = this.h[i + 5]; rlT.n = rvv.b; rlT.f9128o = rvv.c; rlT.l = rvv.h; rlT.t = rvv.j; rlT.b(rvv); i2++; i += 6; } rlT.q = this.l; rlT.m = this.j; rlT.a = true; rlT.g = this.b; rlT.i = this.c; rlT.h = this.e; rlT.f = this.d; rlT.p = this.k; rlT.s = this.n; rlT.r = this.f8162o; rlT.b = this.g; for (int i5 = 0; i5 < this.f.size(); i5++) { String str = this.f.get(i5); if (str != null) { rlT.k.get(i5).d = yrs.c(str); } } rlT.b(1); return rlT; } @Override // android.os.Parcelable public final void writeToParcel(Parcel parcel, int i) { parcel.writeIntArray(this.h); parcel.writeStringList(this.f); parcel.writeIntArray(this.i); parcel.writeIntArray(this.a); parcel.writeInt(this.l); parcel.writeString(this.j); parcel.writeInt(this.g); parcel.writeInt(this.b); TextUtils.writeToParcel(this.c, parcel, 0); parcel.writeInt(this.e); TextUtils.writeToParcel(this.d, parcel, 0); parcel.writeStringList(this.k); parcel.writeStringList(this.n); parcel.writeInt(this.f8162o ? 1 : 0); } }