2021-07-24 02:37:17 +00:00
|
|
|
package androidx.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.CoroutineContext;
|
|
|
|
import kotlinx.coroutines.CoroutineDispatcher;
|
2021-11-01 07:19:03 +00:00
|
|
|
import s.a.a.n;
|
2021-12-17 22:01:24 +00:00
|
|
|
import s.a.h1;
|
|
|
|
import s.a.k0;
|
|
|
|
import s.a.u;
|
2021-07-24 02:37:17 +00:00
|
|
|
/* compiled from: Lifecycle.kt */
|
|
|
|
public final class LifecycleKt {
|
|
|
|
public static final LifecycleCoroutineScope getCoroutineScope(Lifecycle lifecycle) {
|
|
|
|
LifecycleCoroutineScopeImpl lifecycleCoroutineScopeImpl;
|
|
|
|
m.checkNotNullParameter(lifecycle, "$this$coroutineScope");
|
|
|
|
do {
|
|
|
|
LifecycleCoroutineScopeImpl lifecycleCoroutineScopeImpl2 = (LifecycleCoroutineScopeImpl) lifecycle.mInternalScopeRef.get();
|
|
|
|
if (lifecycleCoroutineScopeImpl2 != null) {
|
|
|
|
return lifecycleCoroutineScopeImpl2;
|
|
|
|
}
|
2021-12-17 22:01:24 +00:00
|
|
|
u d = f.d(null, 1);
|
|
|
|
CoroutineDispatcher coroutineDispatcher = k0.a;
|
|
|
|
lifecycleCoroutineScopeImpl = new LifecycleCoroutineScopeImpl(lifecycle, CoroutineContext.Element.a.plus((h1) d, n.f3787b.H()));
|
2021-07-24 02:37:17 +00:00
|
|
|
} while (!lifecycle.mInternalScopeRef.compareAndSet(null, lifecycleCoroutineScopeImpl));
|
|
|
|
lifecycleCoroutineScopeImpl.register();
|
|
|
|
return lifecycleCoroutineScopeImpl;
|
|
|
|
}
|
|
|
|
}
|