Initial version -- added millennium read funcionality
This commit is contained in:
@@ -0,0 +1,131 @@
|
||||
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.google.android.gms.libs.identity.ClientIdentity;
|
||||
import com.google.android.gms.libs.identity.zzeo;
|
||||
import kotlinx.serialization.json.internal.AbstractJsonLexerKt;
|
||||
import org.checkerframework.dataflow.qual.Pure;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-location@@21.2.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public final class LastLocationRequest extends AbstractSafeParcelable {
|
||||
public static final Parcelable.Creator<LastLocationRequest> CREATOR = new zzaa();
|
||||
private final long zza;
|
||||
private final int zzb;
|
||||
private final boolean zzc;
|
||||
private final ClientIdentity zzd;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-location@@21.2.0 */
|
||||
public static final class Builder {
|
||||
private long zza;
|
||||
private int zzb;
|
||||
private final boolean zzc;
|
||||
private final ClientIdentity zzd;
|
||||
|
||||
public Builder() {
|
||||
this.zza = Long.MAX_VALUE;
|
||||
this.zzb = 0;
|
||||
this.zzc = false;
|
||||
this.zzd = null;
|
||||
}
|
||||
|
||||
public Builder(LastLocationRequest lastLocationRequest) {
|
||||
this.zza = lastLocationRequest.getMaxUpdateAgeMillis();
|
||||
this.zzb = lastLocationRequest.getGranularity();
|
||||
this.zzc = lastLocationRequest.zza();
|
||||
this.zzd = lastLocationRequest.zzb();
|
||||
}
|
||||
|
||||
public LastLocationRequest build() {
|
||||
return new LastLocationRequest(this.zza, this.zzb, this.zzc, this.zzd);
|
||||
}
|
||||
|
||||
public Builder setGranularity(int i) {
|
||||
zzq.zza(i);
|
||||
this.zzb = i;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setMaxUpdateAgeMillis(long j) {
|
||||
Preconditions.checkArgument(j > 0, "maxUpdateAgeMillis must be greater than 0");
|
||||
this.zza = j;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
LastLocationRequest(long j, int i, boolean z, ClientIdentity clientIdentity) {
|
||||
this.zza = j;
|
||||
this.zzb = i;
|
||||
this.zzc = z;
|
||||
this.zzd = clientIdentity;
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (!(obj instanceof LastLocationRequest)) {
|
||||
return false;
|
||||
}
|
||||
LastLocationRequest lastLocationRequest = (LastLocationRequest) obj;
|
||||
return this.zza == lastLocationRequest.zza && this.zzb == lastLocationRequest.zzb && this.zzc == lastLocationRequest.zzc && Objects.equal(this.zzd, lastLocationRequest.zzd);
|
||||
}
|
||||
|
||||
@Pure
|
||||
public int getGranularity() {
|
||||
return this.zzb;
|
||||
}
|
||||
|
||||
@Pure
|
||||
public long getMaxUpdateAgeMillis() {
|
||||
return this.zza;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(Long.valueOf(this.zza), Integer.valueOf(this.zzb), Boolean.valueOf(this.zzc));
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("LastLocationRequest[");
|
||||
if (this.zza != Long.MAX_VALUE) {
|
||||
sb.append("maxAge=");
|
||||
zzeo.zzc(this.zza, sb);
|
||||
}
|
||||
if (this.zzb != 0) {
|
||||
sb.append(", ");
|
||||
sb.append(zzq.zzb(this.zzb));
|
||||
}
|
||||
if (this.zzc) {
|
||||
sb.append(", bypass");
|
||||
}
|
||||
if (this.zzd != null) {
|
||||
sb.append(", impersonation=");
|
||||
sb.append(this.zzd);
|
||||
}
|
||||
sb.append(AbstractJsonLexerKt.END_LIST);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
int iBeginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
|
||||
SafeParcelWriter.writeLong(parcel, 1, getMaxUpdateAgeMillis());
|
||||
SafeParcelWriter.writeInt(parcel, 2, getGranularity());
|
||||
SafeParcelWriter.writeBoolean(parcel, 3, this.zzc);
|
||||
SafeParcelWriter.writeParcelable(parcel, 5, this.zzd, i, false);
|
||||
SafeParcelWriter.finishObjectHeader(parcel, iBeginObjectHeader);
|
||||
}
|
||||
|
||||
@Pure
|
||||
public final boolean zza() {
|
||||
return this.zzc;
|
||||
}
|
||||
|
||||
@Pure
|
||||
public final ClientIdentity zzb() {
|
||||
return this.zzd;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user