44 lines
1.6 KiB
Java
44 lines
1.6 KiB
Java
|
package com.huawei.hms.common;
|
||
|
|
||
|
import android.os.Parcel;
|
||
|
import android.os.Parcelable;
|
||
|
import com.huawei.hms.common.internal.safeparcel.SafeParcelReader;
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
public final class FeatureCreator implements Parcelable.Creator<Feature> {
|
||
|
/* JADX WARN: Can't rename method to resolve collision */
|
||
|
@Override // android.os.Parcelable.Creator
|
||
|
public final Feature createFromParcel(Parcel parcel) {
|
||
|
String str = null;
|
||
|
if (parcel == null) {
|
||
|
return null;
|
||
|
}
|
||
|
int validateObjectHeader = SafeParcelReader.validateObjectHeader(parcel);
|
||
|
int i = 0;
|
||
|
long j = -1;
|
||
|
int i2 = 0;
|
||
|
while (i <= validateObjectHeader && parcel.dataPosition() < validateObjectHeader) {
|
||
|
i++;
|
||
|
int readHeader = SafeParcelReader.readHeader(parcel);
|
||
|
int fieldId = SafeParcelReader.getFieldId(readHeader);
|
||
|
if (fieldId == 1) {
|
||
|
str = SafeParcelReader.createString(parcel, readHeader);
|
||
|
} else if (fieldId == 2) {
|
||
|
i2 = SafeParcelReader.readInt(parcel, readHeader);
|
||
|
} else if (fieldId != 3) {
|
||
|
SafeParcelReader.skipUnknownField(parcel, readHeader);
|
||
|
} else {
|
||
|
j = SafeParcelReader.readLong(parcel, readHeader);
|
||
|
}
|
||
|
}
|
||
|
SafeParcelReader.ensureAtEnd(parcel, validateObjectHeader);
|
||
|
return new Feature(str, i2, j);
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Can't rename method to resolve collision */
|
||
|
@Override // android.os.Parcelable.Creator
|
||
|
public final Feature[] newArray(int i) {
|
||
|
return new Feature[i];
|
||
|
}
|
||
|
}
|