Rabbit-R1/switch port/java/sources/androidx/work/impl/DefaultRunnableScheduler.java
2024-05-21 17:08:36 -04:00

25 lines
764 B
Java

package androidx.work.impl;
import android.os.Handler;
import android.os.Looper;
import androidx.core.os.HandlerCompat;
import androidx.work.RunnableScheduler;
/* loaded from: classes2.dex */
public class DefaultRunnableScheduler implements RunnableScheduler {
private final Handler mHandler = HandlerCompat.createAsync(Looper.getMainLooper());
public Handler getHandler() {
return this.mHandler;
}
@Override // androidx.work.RunnableScheduler
public void scheduleWithDelay(long delayInMillis, Runnable runnable) {
this.mHandler.postDelayed(runnable, delayInMillis);
}
@Override // androidx.work.RunnableScheduler
public void cancel(Runnable runnable) {
this.mHandler.removeCallbacks(runnable);
}
}