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

77 lines
2.7 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.location;
import android.content.Intent;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
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.List;
/* loaded from: classes2.dex */
public class ActivityTransitionResult extends AbstractSafeParcelable {
public static final Parcelable.Creator<ActivityTransitionResult> CREATOR = new zzs();
private final List zza;
private Bundle zzb;
public ActivityTransitionResult(List<ActivityTransitionEvent> list) {
this.zzb = null;
Preconditions.checkNotNull(list, "transitionEvents list can't be null.");
if (!list.isEmpty()) {
for (int i = 1; i < list.size(); i++) {
Preconditions.checkArgument(list.get(i).getElapsedRealTimeNanos() >= list.get(i + (-1)).getElapsedRealTimeNanos());
}
}
this.zza = Collections.unmodifiableList(list);
}
public static ActivityTransitionResult extractResult(Intent intent) {
if (hasResult(intent)) {
return (ActivityTransitionResult) SafeParcelableSerializer.deserializeFromIntentExtra(intent, "com.google.android.location.internal.EXTRA_ACTIVITY_TRANSITION_RESULT", CREATOR);
}
return null;
}
public static boolean hasResult(Intent intent) {
if (intent == null) {
return false;
}
return intent.hasExtra("com.google.android.location.internal.EXTRA_ACTIVITY_TRANSITION_RESULT");
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
return this.zza.equals(((ActivityTransitionResult) obj).zza);
}
public int hashCode() {
return this.zza.hashCode();
}
@Override // android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
Preconditions.checkNotNull(parcel);
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
SafeParcelWriter.writeTypedList(parcel, 1, getTransitionEvents(), false);
SafeParcelWriter.writeBundle(parcel, 2, this.zzb, false);
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
}
public ActivityTransitionResult(List list, Bundle bundle) {
this(list);
this.zzb = bundle;
}
public List<ActivityTransitionEvent> getTransitionEvents() {
return this.zza;
}
}