mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-22 16:07:30 +00:00
23 lines
530 B
Java
23 lines
530 B
Java
package org.thoughtcrime.securesms.jobmanager;
|
|
|
|
import androidx.annotation.NonNull;
|
|
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
|
|
class CompositeScheduler implements Scheduler {
|
|
|
|
private final List<Scheduler> schedulers;
|
|
|
|
CompositeScheduler(@NonNull Scheduler... schedulers) {
|
|
this.schedulers = Arrays.asList(schedulers);
|
|
}
|
|
|
|
@Override
|
|
public void schedule(long delay, @NonNull List<Constraint> constraints) {
|
|
for (Scheduler scheduler : schedulers) {
|
|
scheduler.schedule(delay, constraints);
|
|
}
|
|
}
|
|
}
|