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.l;
|
|
|
|
import d0.w.h.c;
|
|
|
|
import d0.w.i.a.e;
|
|
|
|
import d0.w.i.a.k;
|
|
|
|
import d0.z.d.m;
|
2021-07-24 02:37:17 +00:00
|
|
|
import kotlin.Unit;
|
|
|
|
import kotlin.coroutines.Continuation;
|
|
|
|
import kotlin.jvm.functions.Function2;
|
|
|
|
import kotlinx.coroutines.CoroutineScope;
|
|
|
|
/* compiled from: Lifecycle.kt */
|
|
|
|
@e(c = "androidx.lifecycle.LifecycleCoroutineScopeImpl$register$1", f = "Lifecycle.kt", l = {}, m = "invokeSuspend")
|
|
|
|
public final class LifecycleCoroutineScopeImpl$register$1 extends k implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
|
|
|
|
private /* synthetic */ Object L$0;
|
|
|
|
public int label;
|
|
|
|
public final /* synthetic */ LifecycleCoroutineScopeImpl this$0;
|
|
|
|
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
|
|
public LifecycleCoroutineScopeImpl$register$1(LifecycleCoroutineScopeImpl lifecycleCoroutineScopeImpl, Continuation continuation) {
|
|
|
|
super(2, continuation);
|
|
|
|
this.this$0 = lifecycleCoroutineScopeImpl;
|
|
|
|
}
|
|
|
|
|
2021-11-01 07:19:03 +00:00
|
|
|
@Override // d0.w.i.a.a
|
2021-07-24 02:37:17 +00:00
|
|
|
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
|
|
|
m.checkNotNullParameter(continuation, "completion");
|
|
|
|
LifecycleCoroutineScopeImpl$register$1 lifecycleCoroutineScopeImpl$register$1 = new LifecycleCoroutineScopeImpl$register$1(this.this$0, continuation);
|
|
|
|
lifecycleCoroutineScopeImpl$register$1.L$0 = obj;
|
|
|
|
return lifecycleCoroutineScopeImpl$register$1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
|
|
|
|
@Override // kotlin.jvm.functions.Function2
|
|
|
|
public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
|
|
|
|
return ((LifecycleCoroutineScopeImpl$register$1) create(coroutineScope, continuation)).invokeSuspend(Unit.a);
|
|
|
|
}
|
|
|
|
|
2021-11-01 07:19:03 +00:00
|
|
|
@Override // d0.w.i.a.a
|
2021-07-24 02:37:17 +00:00
|
|
|
public final Object invokeSuspend(Object obj) {
|
|
|
|
c.getCOROUTINE_SUSPENDED();
|
|
|
|
if (this.label == 0) {
|
|
|
|
l.throwOnFailure(obj);
|
|
|
|
CoroutineScope coroutineScope = (CoroutineScope) this.L$0;
|
|
|
|
if (this.this$0.getLifecycle$lifecycle_runtime_ktx_release().getCurrentState().compareTo(Lifecycle.State.INITIALIZED) >= 0) {
|
|
|
|
this.this$0.getLifecycle$lifecycle_runtime_ktx_release().addObserver(this.this$0);
|
|
|
|
} else {
|
2021-12-17 22:01:24 +00:00
|
|
|
f.r(coroutineScope.getCoroutineContext(), null, 1, null);
|
2021-07-24 02:37:17 +00:00
|
|
|
}
|
|
|
|
return Unit.a;
|
|
|
|
}
|
|
|
|
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
|
|
|
}
|
|
|
|
}
|