110 lines
3.4 KiB
Java
110 lines
3.4 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 java.lang.annotation.Retention;
|
|
import java.lang.annotation.RetentionPolicy;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public class ActivityTransition extends AbstractSafeParcelable {
|
|
public static final int ACTIVITY_TRANSITION_ENTER = 0;
|
|
public static final int ACTIVITY_TRANSITION_EXIT = 1;
|
|
public static final Parcelable.Creator<ActivityTransition> CREATOR = new zzo();
|
|
private final int zza;
|
|
private final int zzb;
|
|
|
|
@Retention(RetentionPolicy.SOURCE)
|
|
/* loaded from: classes.dex */
|
|
public @interface SupportedActivityTransition {
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public ActivityTransition(int i, int i2) {
|
|
this.zza = i;
|
|
this.zzb = i2;
|
|
}
|
|
|
|
public static void zza(int i) {
|
|
boolean z = false;
|
|
if (i >= 0 && i <= 1) {
|
|
z = true;
|
|
}
|
|
StringBuilder sb = new StringBuilder(41);
|
|
sb.append("Transition type ");
|
|
sb.append(i);
|
|
sb.append(" is not valid.");
|
|
Preconditions.checkArgument(z, sb.toString());
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof ActivityTransition)) {
|
|
return false;
|
|
}
|
|
ActivityTransition activityTransition = (ActivityTransition) obj;
|
|
return this.zza == activityTransition.zza && this.zzb == activityTransition.zzb;
|
|
}
|
|
|
|
public int hashCode() {
|
|
return Objects.hashCode(Integer.valueOf(this.zza), Integer.valueOf(this.zzb));
|
|
}
|
|
|
|
public String toString() {
|
|
int i = this.zza;
|
|
int i2 = this.zzb;
|
|
StringBuilder sb = new StringBuilder(75);
|
|
sb.append("ActivityTransition [mActivityType=");
|
|
sb.append(i);
|
|
sb.append(", mTransitionType=");
|
|
sb.append(i2);
|
|
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, getActivityType());
|
|
SafeParcelWriter.writeInt(parcel, 2, getTransitionType());
|
|
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
|
|
}
|
|
|
|
/* loaded from: classes2.dex */
|
|
public static class Builder {
|
|
private int zza = -1;
|
|
private int zzb = -1;
|
|
|
|
public ActivityTransition build() {
|
|
Preconditions.checkState(this.zza != -1, "Activity type not set.");
|
|
Preconditions.checkState(this.zzb != -1, "Activity transition type not set.");
|
|
return new ActivityTransition(this.zza, this.zzb);
|
|
}
|
|
|
|
public Builder setActivityTransition(int i) {
|
|
ActivityTransition.zza(i);
|
|
this.zzb = i;
|
|
return this;
|
|
}
|
|
|
|
public Builder setActivityType(int i) {
|
|
this.zza = i;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
public int getTransitionType() {
|
|
return this.zzb;
|
|
}
|
|
|
|
public int getActivityType() {
|
|
return this.zza;
|
|
}
|
|
}
|