discord-jadx/app/src/main/java/androidx/lifecycle/PausingDispatcherKt.java

50 lines
2.9 KiB
Java
Raw Normal View History

2021-06-27 20:44:35 +00:00
package androidx.lifecycle;
import androidx.lifecycle.Lifecycle;
2021-12-21 23:37:30 +00:00
import b.i.a.f.e.o.f;
2021-11-08 18:25:28 +00:00
import d0.z.d.m;
2021-06-27 20:44:35 +00:00
import kotlin.coroutines.Continuation;
import kotlin.jvm.functions.Function2;
2021-07-09 21:07:36 +00:00
import kotlinx.coroutines.CoroutineDispatcher;
2021-06-27 20:44:35 +00:00
import kotlinx.coroutines.CoroutineScope;
2021-11-08 18:25:28 +00:00
import s.a.a.n;
2021-12-17 22:03:14 +00:00
import s.a.k0;
2021-06-27 20:44:35 +00:00
/* compiled from: PausingDispatcher.kt */
2022-03-02 20:59:20 +00:00
/* loaded from: classes.dex */
2021-06-27 20:44:35 +00:00
public final class PausingDispatcherKt {
public static final <T> Object whenCreated(Lifecycle lifecycle, Function2<? super CoroutineScope, ? super Continuation<? super T>, ? extends Object> function2, Continuation<? super T> continuation) {
return whenStateAtLeast(lifecycle, Lifecycle.State.CREATED, function2, continuation);
}
public static final <T> Object whenCreated(LifecycleOwner lifecycleOwner, Function2<? super CoroutineScope, ? super Continuation<? super T>, ? extends Object> function2, Continuation<? super T> continuation) {
Lifecycle lifecycle = lifecycleOwner.getLifecycle();
m.checkNotNullExpressionValue(lifecycle, "lifecycle");
return whenCreated(lifecycle, function2, continuation);
}
public static final <T> Object whenResumed(Lifecycle lifecycle, Function2<? super CoroutineScope, ? super Continuation<? super T>, ? extends Object> function2, Continuation<? super T> continuation) {
return whenStateAtLeast(lifecycle, Lifecycle.State.RESUMED, function2, continuation);
}
public static final <T> Object whenResumed(LifecycleOwner lifecycleOwner, Function2<? super CoroutineScope, ? super Continuation<? super T>, ? extends Object> function2, Continuation<? super T> continuation) {
Lifecycle lifecycle = lifecycleOwner.getLifecycle();
m.checkNotNullExpressionValue(lifecycle, "lifecycle");
return whenResumed(lifecycle, function2, continuation);
}
public static final <T> Object whenStarted(Lifecycle lifecycle, Function2<? super CoroutineScope, ? super Continuation<? super T>, ? extends Object> function2, Continuation<? super T> continuation) {
return whenStateAtLeast(lifecycle, Lifecycle.State.STARTED, function2, continuation);
}
public static final <T> Object whenStarted(LifecycleOwner lifecycleOwner, Function2<? super CoroutineScope, ? super Continuation<? super T>, ? extends Object> function2, Continuation<? super T> continuation) {
Lifecycle lifecycle = lifecycleOwner.getLifecycle();
m.checkNotNullExpressionValue(lifecycle, "lifecycle");
return whenStarted(lifecycle, function2, continuation);
}
public static final <T> Object whenStateAtLeast(Lifecycle lifecycle, Lifecycle.State state, Function2<? super CoroutineScope, ? super Continuation<? super T>, ? extends Object> function2, Continuation<? super T> continuation) {
2021-12-17 22:03:14 +00:00
CoroutineDispatcher coroutineDispatcher = k0.a;
2022-04-12 20:58:48 +00:00
return f.C1(n.f3824b.H(), new PausingDispatcherKt$whenStateAtLeast$2(lifecycle, state, function2, null), continuation);
2021-06-27 20:44:35 +00:00
}
}