package androidx.work; import android.annotation.SuppressLint; import androidx.annotation.RequiresApi; import androidx.work.WorkRequest; import androidx.work.impl.utils.DurationApi26Impl; import java.time.Duration; import java.util.concurrent.TimeUnit; import kotlin.jvm.JvmClassMappingKt; import kotlin.jvm.internal.DefaultConstructorMarker; import kotlin.jvm.internal.Intrinsics; import kotlin.jvm.internal.SourceDebugExtension; import kotlin.reflect.KClass; /* loaded from: classes.dex */ public final class PeriodicWorkRequest extends WorkRequest { public static final Companion Companion = new Companion(null); @SuppressLint({"MinMaxConstant"}) public static final long MIN_PERIODIC_FLEX_MILLIS = 300000; @SuppressLint({"MinMaxConstant"}) public static final long MIN_PERIODIC_INTERVAL_MILLIS = 900000; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ public PeriodicWorkRequest(Builder builder) { super(builder.getId$work_runtime_release(), builder.getWorkSpec$work_runtime_release(), builder.getTags$work_runtime_release()); Intrinsics.checkNotNullParameter(builder, "builder"); } @SourceDebugExtension({"SMAP\nPeriodicWorkRequest.kt\nKotlin\n*S Kotlin\n*F\n+ 1 PeriodicWorkRequest.kt\nandroidx/work/PeriodicWorkRequest$Builder\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,420:1\n1#2:421\n*E\n"}) public static final class Builder extends WorkRequest.Builder { /* JADX WARN: Can't rename method to resolve collision */ @Override // androidx.work.WorkRequest.Builder public Builder getThisObject$work_runtime_release() { return this; } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ public Builder(Class workerClass, long j, TimeUnit repeatIntervalTimeUnit) { super(workerClass); Intrinsics.checkNotNullParameter(workerClass, "workerClass"); Intrinsics.checkNotNullParameter(repeatIntervalTimeUnit, "repeatIntervalTimeUnit"); getWorkSpec$work_runtime_release().setPeriodic(repeatIntervalTimeUnit.toMillis(j)); } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ public Builder(KClass workerClass, long j, TimeUnit repeatIntervalTimeUnit) { super(JvmClassMappingKt.getJavaClass(workerClass)); Intrinsics.checkNotNullParameter(workerClass, "workerClass"); Intrinsics.checkNotNullParameter(repeatIntervalTimeUnit, "repeatIntervalTimeUnit"); getWorkSpec$work_runtime_release().setPeriodic(repeatIntervalTimeUnit.toMillis(j)); } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ @RequiresApi(26) public Builder(Class workerClass, Duration repeatInterval) { super(workerClass); Intrinsics.checkNotNullParameter(workerClass, "workerClass"); Intrinsics.checkNotNullParameter(repeatInterval, "repeatInterval"); getWorkSpec$work_runtime_release().setPeriodic(DurationApi26Impl.toMillisCompat(repeatInterval)); } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ @RequiresApi(26) public Builder(KClass workerClass, Duration repeatInterval) { super(JvmClassMappingKt.getJavaClass(workerClass)); Intrinsics.checkNotNullParameter(workerClass, "workerClass"); Intrinsics.checkNotNullParameter(repeatInterval, "repeatInterval"); getWorkSpec$work_runtime_release().setPeriodic(DurationApi26Impl.toMillisCompat(repeatInterval)); } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ public Builder(Class workerClass, long j, TimeUnit repeatIntervalTimeUnit, long j2, TimeUnit flexIntervalTimeUnit) { super(workerClass); Intrinsics.checkNotNullParameter(workerClass, "workerClass"); Intrinsics.checkNotNullParameter(repeatIntervalTimeUnit, "repeatIntervalTimeUnit"); Intrinsics.checkNotNullParameter(flexIntervalTimeUnit, "flexIntervalTimeUnit"); getWorkSpec$work_runtime_release().setPeriodic(repeatIntervalTimeUnit.toMillis(j), flexIntervalTimeUnit.toMillis(j2)); } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ public Builder(KClass workerClass, long j, TimeUnit repeatIntervalTimeUnit, long j2, TimeUnit flexIntervalTimeUnit) { super(JvmClassMappingKt.getJavaClass(workerClass)); Intrinsics.checkNotNullParameter(workerClass, "workerClass"); Intrinsics.checkNotNullParameter(repeatIntervalTimeUnit, "repeatIntervalTimeUnit"); Intrinsics.checkNotNullParameter(flexIntervalTimeUnit, "flexIntervalTimeUnit"); getWorkSpec$work_runtime_release().setPeriodic(repeatIntervalTimeUnit.toMillis(j), flexIntervalTimeUnit.toMillis(j2)); } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ @RequiresApi(26) public Builder(Class workerClass, Duration repeatInterval, Duration flexInterval) { super(workerClass); Intrinsics.checkNotNullParameter(workerClass, "workerClass"); Intrinsics.checkNotNullParameter(repeatInterval, "repeatInterval"); Intrinsics.checkNotNullParameter(flexInterval, "flexInterval"); getWorkSpec$work_runtime_release().setPeriodic(DurationApi26Impl.toMillisCompat(repeatInterval), DurationApi26Impl.toMillisCompat(flexInterval)); } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ @RequiresApi(26) public Builder(KClass workerClass, Duration repeatInterval, Duration flexInterval) { super(JvmClassMappingKt.getJavaClass(workerClass)); Intrinsics.checkNotNullParameter(workerClass, "workerClass"); Intrinsics.checkNotNullParameter(repeatInterval, "repeatInterval"); Intrinsics.checkNotNullParameter(flexInterval, "flexInterval"); getWorkSpec$work_runtime_release().setPeriodic(DurationApi26Impl.toMillisCompat(repeatInterval), DurationApi26Impl.toMillisCompat(flexInterval)); } public final Builder setNextScheduleTimeOverride(long j) { if (j == Long.MAX_VALUE) { throw new IllegalArgumentException("Cannot set Long.MAX_VALUE as the schedule override time".toString()); } getWorkSpec$work_runtime_release().setNextScheduleTimeOverride(j); getWorkSpec$work_runtime_release().setNextScheduleTimeOverrideGeneration(1); return this; } public final Builder clearNextScheduleTimeOverride() { getWorkSpec$work_runtime_release().setNextScheduleTimeOverride(Long.MAX_VALUE); getWorkSpec$work_runtime_release().setNextScheduleTimeOverrideGeneration(1); return this; } /* JADX WARN: Can't rename method to resolve collision */ @Override // androidx.work.WorkRequest.Builder public PeriodicWorkRequest buildInternal$work_runtime_release() { if (getBackoffCriteriaSet$work_runtime_release() && getWorkSpec$work_runtime_release().constraints.requiresDeviceIdle()) { throw new IllegalArgumentException("Cannot set backoff criteria on an idle mode job".toString()); } if (!(!getWorkSpec$work_runtime_release().expedited)) { throw new IllegalArgumentException("PeriodicWorkRequests cannot be expedited".toString()); } return new PeriodicWorkRequest(this); } } public static final class Companion { public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) { this(); } private Companion() { } } }