112 lines
4.8 KiB
Java
112 lines
4.8 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;
|
|
|
|
/* JADX INFO: compiled from: com.google.android.gms:play-services-location@@21.2.0 */
|
|
/* JADX INFO: loaded from: classes2.dex */
|
|
public class ActivityTransitionRequest extends AbstractSafeParcelable {
|
|
public static final Parcelable.Creator<ActivityTransitionRequest> CREATOR = new zzh();
|
|
public static final Comparator<ActivityTransition> IS_SAME_TRANSITION = new zzg();
|
|
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()) {
|
|
ActivityTransitionRequest activityTransitionRequest = (ActivityTransitionRequest) obj;
|
|
if (Objects.equal(this.zza, activityTransitionRequest.zza) && Objects.equal(this.zzb, activityTransitionRequest.zzb) && Objects.equal(this.zzd, activityTransitionRequest.zzd) && Objects.equal(this.zzc, activityTransitionRequest.zzc)) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public int hashCode() {
|
|
int iHashCode = this.zza.hashCode() * 31;
|
|
String str = this.zzb;
|
|
int iHashCode2 = (iHashCode + (str != null ? str.hashCode() : 0)) * 31;
|
|
List list = this.zzc;
|
|
int iHashCode3 = (iHashCode2 + (list != null ? list.hashCode() : 0)) * 31;
|
|
String str2 = this.zzd;
|
|
return iHashCode3 + (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() {
|
|
List list = this.zzc;
|
|
String strValueOf = String.valueOf(this.zza);
|
|
String strValueOf2 = String.valueOf(list);
|
|
String str = this.zzd;
|
|
int length = String.valueOf(strValueOf).length();
|
|
String str2 = this.zzb;
|
|
int length2 = String.valueOf(str2).length();
|
|
StringBuilder sb = new StringBuilder(length + 48 + length2 + 12 + String.valueOf(strValueOf2).length() + 18 + String.valueOf(str).length() + 1);
|
|
sb.append("ActivityTransitionRequest [mTransitions=");
|
|
sb.append(strValueOf);
|
|
sb.append(", mTag='");
|
|
sb.append(str2);
|
|
sb.append("', mClients=");
|
|
sb.append(strValueOf2);
|
|
sb.append(", mAttributionTag=");
|
|
sb.append(str);
|
|
sb.append("]");
|
|
return sb.toString();
|
|
}
|
|
|
|
@Override // android.os.Parcelable
|
|
public void writeToParcel(Parcel parcel, int i) {
|
|
Preconditions.checkNotNull(parcel);
|
|
List list = this.zza;
|
|
int iBeginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
|
|
SafeParcelWriter.writeTypedList(parcel, 1, list, 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, iBeginObjectHeader);
|
|
}
|
|
|
|
public final ActivityTransitionRequest zza(String str) {
|
|
this.zzd = str;
|
|
return this;
|
|
}
|
|
|
|
public ActivityTransitionRequest(List list, String str, List list2, String str2) {
|
|
Preconditions.checkNotNull(list, "transitions can't be null");
|
|
Preconditions.checkArgument(!list.isEmpty(), "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;
|
|
this.zzc = list2 == null ? Collections.emptyList() : Collections.unmodifiableList(list2);
|
|
this.zzd = str2;
|
|
}
|
|
} |