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

50 lines
2.9 KiB
Java
Raw Normal View History

2021-07-24 02:37:17 +00:00
package androidx.lifecycle;
import androidx.lifecycle.Lifecycle;
2021-12-17 22:01:24 +00:00
import b.i.a.f.e.o.f;
2021-11-01 07:19:03 +00:00
import d0.z.d.m;
2021-07-24 02:37:17 +00:00
import kotlin.coroutines.Continuation;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineDispatcher;
import kotlinx.coroutines.CoroutineScope;
2021-11-01 07:19:03 +00:00
import s.a.a.n;
2021-12-17 22:01:24 +00:00
import s.a.k0;
2021-07-24 02:37:17 +00:00
/* compiled from: PausingDispatcher.kt */
2022-03-01 22:12:19 +00:00
/* loaded from: classes.dex */
2021-07-24 02:37:17 +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:01:24 +00:00
CoroutineDispatcher coroutineDispatcher = k0.a;
2022-03-07 09:36:12 +00:00
return f.C1(n.f3802b.H(), new PausingDispatcherKt$whenStateAtLeast$2(lifecycle, state, function2, null), continuation);
2021-07-24 02:37:17 +00:00
}
}