package mj;

import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.collection.t0;

/* loaded from: classes3.dex */
public class a extends z3.a {
    public static final Parcelable.Creator<a> CREATOR = new C0661a();

    /* renamed from: r, reason: collision with root package name */
    public final t0 f29154r;

    /* renamed from: mj.a$a, reason: collision with other inner class name */
    /* loaded from: classes3.dex */
    class C0661a implements Parcelable.ClassLoaderCreator {
        C0661a() {
        }

        /* JADX WARN: Multi-variable type inference failed */
        @Override // android.os.Parcelable.Creator
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public a createFromParcel(Parcel parcel) {
            return new a(parcel, null, 0 == true ? 1 : 0);
        }

        @Override // android.os.Parcelable.ClassLoaderCreator
        /* renamed from: b, reason: merged with bridge method [inline-methods] */
        public a createFromParcel(Parcel parcel, ClassLoader classLoader) {
            return new a(parcel, classLoader, null);
        }

        @Override // android.os.Parcelable.Creator
        /* renamed from: c, reason: merged with bridge method [inline-methods] */
        public a[] newArray(int i10) {
            return new a[i10];
        }
    }

    /* synthetic */ a(Parcel parcel, ClassLoader classLoader, C0661a c0661a) {
        this(parcel, classLoader);
    }

    public String toString() {
        return "ExtendableSavedState{" + Integer.toHexString(System.identityHashCode(this)) + " states=" + this.f29154r + "}";
    }

    @Override // z3.a, android.os.Parcelable
    public void writeToParcel(Parcel parcel, int i10) {
        super.writeToParcel(parcel, i10);
        int size = this.f29154r.size();
        parcel.writeInt(size);
        String[] strArr = new String[size];
        Bundle[] bundleArr = new Bundle[size];
        for (int i11 = 0; i11 < size; i11++) {
            strArr[i11] = (String) this.f29154r.f(i11);
            bundleArr[i11] = (Bundle) this.f29154r.m(i11);
        }
        parcel.writeStringArray(strArr);
        parcel.writeTypedArray(bundleArr, 0);
    }

    public a(Parcelable parcelable) {
        super(parcelable);
        this.f29154r = new t0();
    }

    private a(Parcel parcel, ClassLoader classLoader) {
        super(parcel, classLoader);
        int readInt = parcel.readInt();
        String[] strArr = new String[readInt];
        parcel.readStringArray(strArr);
        Bundle[] bundleArr = new Bundle[readInt];
        parcel.readTypedArray(bundleArr, Bundle.CREATOR);
        this.f29154r = new t0(readInt);
        for (int i10 = 0; i10 < readInt; i10++) {
            this.f29154r.put(strArr[i10], bundleArr[i10]);
        }
    }
}
