what-the-bank/sources/com/google/android/gms/internal/location/zzbj.java

154 lines
5.7 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.internal.location;
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 com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.huawei.hms.framework.network.grs.GrsBaseInfo;
import java.util.Locale;
/* loaded from: classes2.dex */
public final class zzbj extends AbstractSafeParcelable implements Geofence {
public static final Parcelable.Creator<zzbj> CREATOR = new zzbk();
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 zzbj(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 = String.valueOf(str);
throw new IllegalArgumentException(valueOf.length() != 0 ? "requestId is null or too long: ".concat(valueOf) : new String("requestId is null or too long: "));
}
if (f <= BitmapDescriptorFactory.HUE_RED) {
StringBuilder sb = new StringBuilder(31);
sb.append("invalid radius: ");
sb.append(f);
throw new IllegalArgumentException(sb.toString());
}
if (d > 90.0d || d < -90.0d) {
StringBuilder sb2 = new StringBuilder(42);
sb2.append("invalid latitude: ");
sb2.append(d);
throw new IllegalArgumentException(sb2.toString());
}
if (d2 > 180.0d || d2 < -180.0d) {
StringBuilder sb3 = new StringBuilder(43);
sb3.append("invalid longitude: ");
sb3.append(d2);
throw new IllegalArgumentException(sb3.toString());
}
int i4 = i & 7;
if (i4 == 0) {
StringBuilder sb4 = new StringBuilder(46);
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 zzbj)) {
return false;
}
zzbj zzbjVar = (zzbj) obj;
return this.zzf == zzbjVar.zzf && this.zzd == zzbjVar.zzd && this.zze == zzbjVar.zze && this.zzc == zzbjVar.zzc;
}
public final int hashCode() {
long doubleToLongBits = Double.doubleToLongBits(this.zzd);
long doubleToLongBits2 = Double.doubleToLongBits(this.zze);
return ((((((((((int) (doubleToLongBits ^ (doubleToLongBits >>> 32))) + 31) * 31) + ((int) (doubleToLongBits2 ^ (doubleToLongBits2 >>> 32)))) * 31) + Float.floatToIntBits(this.zzf)) * 31) + this.zzc) * 31) + this.zzg;
}
public final String toString() {
Locale locale = Locale.US;
Object[] objArr = new Object[9];
short s = this.zzc;
objArr[0] = s != -1 ? s != 1 ? GrsBaseInfo.CountryCodeSource.UNKNOWN : "CIRCLE" : "INVALID";
objArr[1] = this.zza.replaceAll("\\p{C}", "?");
objArr[2] = Integer.valueOf(this.zzg);
objArr[3] = Double.valueOf(this.zzd);
objArr[4] = Double.valueOf(this.zze);
objArr[5] = Float.valueOf(this.zzf);
objArr[6] = Integer.valueOf(this.zzh / 1000);
objArr[7] = Integer.valueOf(this.zzi);
objArr[8] = Long.valueOf(this.zzb);
return String.format(locale, "Geofence[%s id:%s transitions:%d %.6f, %.6f %.0fm, resp=%ds, dwell=%dms, @%d]", objArr);
}
@Override // android.os.Parcelable
public final void writeToParcel(Parcel parcel, int i) {
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
SafeParcelWriter.writeString(parcel, 1, this.zza, 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, beginObjectHeader);
}
@Override // com.google.android.gms.location.Geofence
public final int getTransitionTypes() {
return this.zzg;
}
@Override // com.google.android.gms.location.Geofence
public final String getRequestId() {
return this.zza;
}
@Override // com.google.android.gms.location.Geofence
public final float getRadius() {
return this.zzf;
}
@Override // com.google.android.gms.location.Geofence
public final int getNotificationResponsiveness() {
return this.zzh;
}
@Override // com.google.android.gms.location.Geofence
public final double getLongitude() {
return this.zze;
}
@Override // com.google.android.gms.location.Geofence
public final int getLoiteringDelay() {
return this.zzi;
}
@Override // com.google.android.gms.location.Geofence
public final double getLatitude() {
return this.zzd;
}
@Override // com.google.android.gms.location.Geofence
public final long getExpirationTime() {
return this.zzb;
}
}