alexandroid/decompiled/jadx/sources/com/google/android/material/datepicker/TimeSource.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

47 lines
1.3 KiB
Java

package com.google.android.material.datepicker;
import androidx.annotation.Nullable;
import java.util.Calendar;
import java.util.TimeZone;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* loaded from: classes7.dex */
class TimeSource {
private static final TimeSource SYSTEM_TIME_SOURCE = new TimeSource(null, null);
@Nullable
private final Long fixedTimeMs;
@Nullable
private final TimeZone fixedTimeZone;
private TimeSource(@Nullable Long l, @Nullable TimeZone timeZone) {
this.fixedTimeMs = l;
this.fixedTimeZone = timeZone;
}
public static TimeSource fixed(long j) {
return new TimeSource(Long.valueOf(j), null);
}
public static TimeSource system() {
return SYSTEM_TIME_SOURCE;
}
public Calendar now(@Nullable TimeZone timeZone) {
Calendar calendar = timeZone == null ? Calendar.getInstance() : Calendar.getInstance(timeZone);
Long l = this.fixedTimeMs;
if (l != null) {
calendar.setTimeInMillis(l.longValue());
}
return calendar;
}
public static TimeSource fixed(long j, @Nullable TimeZone timeZone) {
return new TimeSource(Long.valueOf(j), timeZone);
}
public Calendar now() {
return now(this.fixedTimeZone);
}
}