Files
rr3-apk/decompiled/sources/androidx/work/impl/background/systemalarm/SystemAlarmScheduler.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

43 lines
1.5 KiB
Java

package androidx.work.impl.background.systemalarm;
import android.content.Context;
import androidx.annotation.NonNull;
import androidx.annotation.RestrictTo;
import androidx.work.Logger;
import androidx.work.impl.Scheduler;
import androidx.work.impl.model.WorkSpec;
import androidx.work.impl.model.WorkSpecKt;
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP})
/* loaded from: classes.dex */
public class SystemAlarmScheduler implements Scheduler {
private static final String TAG = Logger.tagWithPrefix("SystemAlarmScheduler");
private final Context mContext;
@Override // androidx.work.impl.Scheduler
public boolean hasLimitedSchedulingSlots() {
return true;
}
public SystemAlarmScheduler(@NonNull Context context) {
this.mContext = context.getApplicationContext();
}
@Override // androidx.work.impl.Scheduler
public void schedule(@NonNull WorkSpec... workSpecArr) {
for (WorkSpec workSpec : workSpecArr) {
scheduleWorkSpec(workSpec);
}
}
@Override // androidx.work.impl.Scheduler
public void cancel(@NonNull String str) {
this.mContext.startService(CommandHandler.createStopWorkIntent(this.mContext, str));
}
private void scheduleWorkSpec(@NonNull WorkSpec workSpec) {
Logger.get().debug(TAG, "Scheduling work with workSpecId " + workSpec.id);
this.mContext.startService(CommandHandler.createScheduleWorkIntent(this.mContext, WorkSpecKt.generationalId(workSpec)));
}
}