112 lines
4.6 KiB
Java
112 lines
4.6 KiB
Java
package com.google.android.gms.location;
|
|
|
|
import android.content.Intent;
|
|
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.google.android.gms.common.internal.safeparcel.SafeParcelableSerializer;
|
|
import java.util.Collections;
|
|
import java.util.Comparator;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import java.util.TreeSet;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public class ActivityTransitionRequest extends AbstractSafeParcelable {
|
|
public static final Parcelable.Creator<ActivityTransitionRequest> CREATOR = new zzr();
|
|
public static final Comparator<ActivityTransition> IS_SAME_TRANSITION = new zzq();
|
|
private final List zza;
|
|
private final String zzb;
|
|
private final List zzc;
|
|
private String zzd;
|
|
|
|
public ActivityTransitionRequest(List<ActivityTransition> list) {
|
|
this(list, null, null, null);
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (obj == null || getClass() != obj.getClass()) {
|
|
return false;
|
|
}
|
|
ActivityTransitionRequest activityTransitionRequest = (ActivityTransitionRequest) obj;
|
|
return Objects.equal(this.zza, activityTransitionRequest.zza) && Objects.equal(this.zzb, activityTransitionRequest.zzb) && Objects.equal(this.zzd, activityTransitionRequest.zzd) && Objects.equal(this.zzc, activityTransitionRequest.zzc);
|
|
}
|
|
|
|
public int hashCode() {
|
|
int hashCode = this.zza.hashCode();
|
|
String str = this.zzb;
|
|
int hashCode2 = str != null ? str.hashCode() : 0;
|
|
List list = this.zzc;
|
|
int hashCode3 = list != null ? list.hashCode() : 0;
|
|
String str2 = this.zzd;
|
|
return (((((hashCode * 31) + hashCode2) * 31) + hashCode3) * 31) + (str2 != null ? str2.hashCode() : 0);
|
|
}
|
|
|
|
public void serializeToIntentExtra(Intent intent) {
|
|
Preconditions.checkNotNull(intent);
|
|
SafeParcelableSerializer.serializeToIntentExtra(this, intent, "com.google.android.location.internal.EXTRA_ACTIVITY_TRANSITION_REQUEST");
|
|
}
|
|
|
|
public String toString() {
|
|
String valueOf = String.valueOf(this.zza);
|
|
String str = this.zzb;
|
|
String valueOf2 = String.valueOf(this.zzc);
|
|
String str2 = this.zzd;
|
|
StringBuilder sb = new StringBuilder(String.valueOf(valueOf).length() + 79 + String.valueOf(str).length() + String.valueOf(valueOf2).length() + String.valueOf(str2).length());
|
|
sb.append("ActivityTransitionRequest [mTransitions=");
|
|
sb.append(valueOf);
|
|
sb.append(", mTag='");
|
|
sb.append(str);
|
|
sb.append("', mClients=");
|
|
sb.append(valueOf2);
|
|
sb.append(", mAttributionTag=");
|
|
sb.append(str2);
|
|
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.writeTypedList(parcel, 1, this.zza, false);
|
|
SafeParcelWriter.writeString(parcel, 2, this.zzb, false);
|
|
SafeParcelWriter.writeTypedList(parcel, 3, this.zzc, false);
|
|
SafeParcelWriter.writeString(parcel, 4, this.zzd, false);
|
|
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
|
|
}
|
|
|
|
public ActivityTransitionRequest(List list, String str, List list2, String str2) {
|
|
List unmodifiableList;
|
|
Preconditions.checkNotNull(list, "transitions can't be null");
|
|
Preconditions.checkArgument(list.size() > 0, "transitions can't be empty.");
|
|
Preconditions.checkNotNull(list);
|
|
TreeSet treeSet = new TreeSet(IS_SAME_TRANSITION);
|
|
Iterator it = list.iterator();
|
|
while (it.hasNext()) {
|
|
ActivityTransition activityTransition = (ActivityTransition) it.next();
|
|
Preconditions.checkArgument(treeSet.add(activityTransition), String.format("Found duplicated transition: %s.", activityTransition));
|
|
}
|
|
this.zza = Collections.unmodifiableList(list);
|
|
this.zzb = str;
|
|
if (list2 == null) {
|
|
unmodifiableList = Collections.emptyList();
|
|
} else {
|
|
unmodifiableList = Collections.unmodifiableList(list2);
|
|
}
|
|
this.zzc = unmodifiableList;
|
|
this.zzd = str2;
|
|
}
|
|
|
|
public final ActivityTransitionRequest zza(String str) {
|
|
this.zzd = str;
|
|
return this;
|
|
}
|
|
}
|