jimu-decompiled/sources/com/google/android/gms/common/Feature.java
2025-05-13 19:24:51 +02:00

70 lines
2.0 KiB
Java

package com.google.android.gms.common;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.common.internal.Objects;
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
import com.unity3d.ads.metadata.MediationMetaData;
/* loaded from: classes.dex */
public class Feature extends AbstractSafeParcelable {
public static final Parcelable.Creator<Feature> CREATOR = new zzb();
private final String name;
@Deprecated
private final int zzk;
private final long zzl;
public Feature(String str, long j) {
this.name = str;
this.zzl = j;
this.zzk = -1;
}
public boolean equals(Object obj) {
if (obj instanceof Feature) {
Feature feature = (Feature) obj;
if (((getName() != null && getName().equals(feature.getName())) || (getName() == null && feature.getName() == null)) && getVersion() == feature.getVersion()) {
return true;
}
}
return false;
}
public String getName() {
return this.name;
}
public long getVersion() {
long j = this.zzl;
return j == -1 ? this.zzk : j;
}
public int hashCode() {
return Objects.a(getName(), Long.valueOf(getVersion()));
}
public String toString() {
Objects.ToStringHelper a = Objects.a(this);
a.a(MediationMetaData.KEY_NAME, getName());
a.a(MediationMetaData.KEY_VERSION, Long.valueOf(getVersion()));
return a.toString();
}
@Override // android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
int a = SafeParcelWriter.a(parcel);
SafeParcelWriter.a(parcel, 1, getName(), false);
SafeParcelWriter.a(parcel, 2, this.zzk);
SafeParcelWriter.a(parcel, 3, getVersion());
SafeParcelWriter.a(parcel, a);
}
public Feature(String str, int i, long j) {
this.name = str;
this.zzk = i;
this.zzl = j;
}
}