mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-14 09:57:16 +01:00
67 lines
1.8 KiB
Java
67 lines
1.8 KiB
Java
package com.google.mlkit.common.model;
|
|
|
|
import android.annotation.TargetApi;
|
|
import androidx.annotation.NonNull;
|
|
import androidx.annotation.Nullable;
|
|
import androidx.annotation.RequiresApi;
|
|
import com.google.android.gms.common.internal.Objects;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes8.dex */
|
|
public class DownloadConditions {
|
|
private final boolean zza;
|
|
private final boolean zzb;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
public static class Builder {
|
|
private boolean zza = false;
|
|
private boolean zzb = false;
|
|
|
|
@NonNull
|
|
public DownloadConditions build() {
|
|
return new DownloadConditions(this.zza, this.zzb, null);
|
|
}
|
|
|
|
@NonNull
|
|
@RequiresApi(24)
|
|
@TargetApi(24)
|
|
public Builder requireCharging() {
|
|
this.zza = true;
|
|
return this;
|
|
}
|
|
|
|
@NonNull
|
|
public Builder requireWifi() {
|
|
this.zzb = true;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
public /* synthetic */ DownloadConditions(boolean z, boolean z2, zzb zzbVar) {
|
|
this.zza = z;
|
|
this.zzb = z2;
|
|
}
|
|
|
|
public boolean equals(@Nullable Object obj) {
|
|
if (obj == this) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof DownloadConditions)) {
|
|
return false;
|
|
}
|
|
DownloadConditions downloadConditions = (DownloadConditions) obj;
|
|
return this.zza == downloadConditions.zza && this.zzb == downloadConditions.zzb;
|
|
}
|
|
|
|
public int hashCode() {
|
|
return Objects.hashCode(Boolean.valueOf(this.zza), Boolean.valueOf(this.zzb));
|
|
}
|
|
|
|
public boolean isChargingRequired() {
|
|
return this.zza;
|
|
}
|
|
|
|
public boolean isWifiRequired() {
|
|
return this.zzb;
|
|
}
|
|
}
|