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

99 lines
3.2 KiB
Java

package com.google.android.gms.location;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.common.internal.Objects;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
import com.huawei.hms.framework.network.grs.GrsBaseInfo;
import java.util.Comparator;
/* loaded from: classes2.dex */
public class DetectedActivity extends AbstractSafeParcelable {
public static final int IN_VEHICLE = 0;
public static final int ON_BICYCLE = 1;
public static final int ON_FOOT = 2;
public static final int RUNNING = 8;
public static final int STILL = 3;
public static final int TILTING = 5;
public static final int UNKNOWN = 4;
public static final int WALKING = 7;
int zzb;
int zzc;
public static final Comparator zza = new zzu();
public static final Parcelable.Creator<DetectedActivity> CREATOR = new zzv();
public DetectedActivity(int i, int i2) {
this.zzb = i;
this.zzc = i2;
}
public final boolean equals(Object obj) {
if (!(obj instanceof DetectedActivity)) {
return false;
}
DetectedActivity detectedActivity = (DetectedActivity) obj;
return this.zzb == detectedActivity.zzb && this.zzc == detectedActivity.zzc;
}
public final int hashCode() {
return Objects.hashCode(Integer.valueOf(this.zzb), Integer.valueOf(this.zzc));
}
public String toString() {
String str;
int type = getType();
if (type == 0) {
str = "IN_VEHICLE";
} else if (type == 1) {
str = "ON_BICYCLE";
} else if (type == 2) {
str = "ON_FOOT";
} else if (type == 3) {
str = "STILL";
} else if (type == 4) {
str = GrsBaseInfo.CountryCodeSource.UNKNOWN;
} else if (type == 5) {
str = "TILTING";
} else if (type == 7) {
str = "WALKING";
} else if (type == 8) {
str = "RUNNING";
} else if (type != 16) {
str = type != 17 ? Integer.toString(type) : "IN_RAIL_VEHICLE";
} else {
str = "IN_ROAD_VEHICLE";
}
int i = this.zzc;
StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 48);
sb.append("DetectedActivity [type=");
sb.append(str);
sb.append(", confidence=");
sb.append(i);
sb.append("]");
return sb.toString();
}
@Override // android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
Preconditions.checkNotNull(parcel);
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
SafeParcelWriter.writeInt(parcel, 1, this.zzb);
SafeParcelWriter.writeInt(parcel, 2, this.zzc);
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
}
public int getType() {
int i = this.zzb;
if (i > 22 || i < 0) {
return 4;
}
return i;
}
public int getConfidence() {
return this.zzc;
}
}