Files
iTartanas/itranvias_code/com/google/android.gms/libs.identity/zzek.java
T

145 lines
5.5 KiB
Java

package com.google.android.gms.libs.identity;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
import com.google.android.gms.location.Geofence;
import java.util.Locale;
/* JADX INFO: compiled from: com.google.android.gms:play-services-location@@21.2.0 */
/* JADX INFO: loaded from: classes2.dex */
public final class zzek extends AbstractSafeParcelable implements Geofence {
public static final Parcelable.Creator<zzek> CREATOR = new zzel();
private final String zza;
private final long zzb;
private final short zzc;
private final double zzd;
private final double zze;
private final float zzf;
private final int zzg;
private final int zzh;
private final int zzi;
public zzek(String str, int i, short s, double d, double d2, float f, long j, int i2, int i3) {
if (str == null || str.length() > 100) {
String.valueOf(str);
throw new IllegalArgumentException("requestId is null or too long: ".concat(String.valueOf(str)));
}
if (f <= 0.0f) {
StringBuilder sb = new StringBuilder(String.valueOf(f).length() + 16);
sb.append("invalid radius: ");
sb.append(f);
throw new IllegalArgumentException(sb.toString());
}
if (d > 90.0d || d < -90.0d) {
StringBuilder sb2 = new StringBuilder(String.valueOf(d).length() + 18);
sb2.append("invalid latitude: ");
sb2.append(d);
throw new IllegalArgumentException(sb2.toString());
}
if (d2 > 180.0d || d2 < -180.0d) {
StringBuilder sb3 = new StringBuilder(String.valueOf(d2).length() + 19);
sb3.append("invalid longitude: ");
sb3.append(d2);
throw new IllegalArgumentException(sb3.toString());
}
int i4 = i & 7;
if (i4 == 0) {
StringBuilder sb4 = new StringBuilder(String.valueOf(i).length() + 35);
sb4.append("No supported transition specified: ");
sb4.append(i);
throw new IllegalArgumentException(sb4.toString());
}
this.zzc = s;
this.zza = str;
this.zzd = d;
this.zze = d2;
this.zzf = f;
this.zzb = j;
this.zzg = i4;
this.zzh = i2;
this.zzi = i3;
}
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj instanceof zzek) {
zzek zzekVar = (zzek) obj;
if (this.zzf == zzekVar.zzf && this.zzd == zzekVar.zzd && this.zze == zzekVar.zze && this.zzc == zzekVar.zzc && this.zzg == zzekVar.zzg) {
return true;
}
}
return false;
}
@Override // com.google.android.gms.location.Geofence
public final long getExpirationTime() {
return this.zzb;
}
@Override // com.google.android.gms.location.Geofence
public final double getLatitude() {
return this.zzd;
}
@Override // com.google.android.gms.location.Geofence
public final int getLoiteringDelay() {
return this.zzi;
}
@Override // com.google.android.gms.location.Geofence
public final double getLongitude() {
return this.zze;
}
@Override // com.google.android.gms.location.Geofence
public final int getNotificationResponsiveness() {
return this.zzh;
}
@Override // com.google.android.gms.location.Geofence
public final float getRadius() {
return this.zzf;
}
@Override // com.google.android.gms.location.Geofence
public final String getRequestId() {
return this.zza;
}
@Override // com.google.android.gms.location.Geofence
public final int getTransitionTypes() {
return this.zzg;
}
public final int hashCode() {
long jDoubleToLongBits = Double.doubleToLongBits(this.zzd);
long j = jDoubleToLongBits ^ (jDoubleToLongBits >>> 32);
long jDoubleToLongBits2 = Double.doubleToLongBits(this.zze);
return ((((((((((int) j) + 31) * 31) + ((int) (jDoubleToLongBits2 ^ (jDoubleToLongBits2 >>> 32)))) * 31) + Float.floatToIntBits(this.zzf)) * 31) + this.zzc) * 31) + this.zzg;
}
public final String toString() {
short s = this.zzc;
return String.format(Locale.US, "Geofence[%s id:%s transitions:%d %.6f, %.6f %.0fm, resp=%ds, dwell=%dms, @%d]", s != -1 ? s != 1 ? "UNKNOWN" : "CIRCLE" : "INVALID", this.zza.replaceAll("\\p{C}", "?"), Integer.valueOf(this.zzg), Double.valueOf(this.zzd), Double.valueOf(this.zze), Float.valueOf(this.zzf), Integer.valueOf(this.zzh / 1000), Integer.valueOf(this.zzi), Long.valueOf(this.zzb));
}
@Override // android.os.Parcelable
public final void writeToParcel(Parcel parcel, int i) {
String str = this.zza;
int iBeginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
SafeParcelWriter.writeString(parcel, 1, str, false);
SafeParcelWriter.writeLong(parcel, 2, this.zzb);
SafeParcelWriter.writeShort(parcel, 3, this.zzc);
SafeParcelWriter.writeDouble(parcel, 4, this.zzd);
SafeParcelWriter.writeDouble(parcel, 5, this.zze);
SafeParcelWriter.writeFloat(parcel, 6, this.zzf);
SafeParcelWriter.writeInt(parcel, 7, this.zzg);
SafeParcelWriter.writeInt(parcel, 8, this.zzh);
SafeParcelWriter.writeInt(parcel, 9, this.zzi);
SafeParcelWriter.finishObjectHeader(parcel, iBeginObjectHeader);
}
}