package com.huawei.hms.common.data; import android.database.CursorWindow; import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; import com.huawei.hms.common.internal.safeparcel.SafeParcelReader; /* loaded from: classes2.dex */ public final class DataHolderCreator implements Parcelable.Creator { /* JADX WARN: Can't rename method to resolve collision */ @Override // android.os.Parcelable.Creator public final DataHolder createFromParcel(Parcel parcel) { int validateObjectHeader = SafeParcelReader.validateObjectHeader(parcel); int i = 0; int i2 = 0; int i3 = 0; String[] strArr = null; CursorWindow[] cursorWindowArr = null; Bundle bundle = null; while (i <= validateObjectHeader && parcel.dataPosition() < validateObjectHeader) { i++; int readHeader = SafeParcelReader.readHeader(parcel); int fieldId = SafeParcelReader.getFieldId(readHeader); if (fieldId == 1000) { i2 = SafeParcelReader.readInt(parcel, readHeader); } else if (fieldId == 1) { strArr = SafeParcelReader.createStringArray(parcel, readHeader); } else if (fieldId == 2) { cursorWindowArr = (CursorWindow[]) SafeParcelReader.createTypedArray(parcel, readHeader, CursorWindow.CREATOR); } else if (fieldId == 3) { i3 = SafeParcelReader.readInt(parcel, readHeader); } else if (fieldId != 4) { SafeParcelReader.skipUnknownField(parcel, readHeader); } else { bundle = SafeParcelReader.createBundle(parcel, readHeader); } } SafeParcelReader.ensureAtEnd(parcel, validateObjectHeader); return new DataHolder(i2, strArr, cursorWindowArr, i3, bundle); } /* JADX WARN: Can't rename method to resolve collision */ @Override // android.os.Parcelable.Creator public final DataHolder[] newArray(int i) { return new DataHolder[i]; } }