2021-07-24 02:37:17 +00:00
|
|
|
package androidx.lifecycle;
|
|
|
|
|
|
|
|
import c.q.a.k.a;
|
2021-10-18 07:12:10 +00:00
|
|
|
import c0.z.d.m;
|
2021-07-24 02:37:17 +00:00
|
|
|
import kotlin.coroutines.CoroutineContext;
|
|
|
|
import kotlinx.coroutines.CoroutineDispatcher;
|
2021-10-18 07:12:10 +00:00
|
|
|
import r.a.a.n;
|
|
|
|
import r.a.g1;
|
|
|
|
import r.a.j0;
|
|
|
|
import r.a.t;
|
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;
|
|
|
|
}
|
|
|
|
t b = a.b(null, 1);
|
|
|
|
CoroutineDispatcher coroutineDispatcher = j0.a;
|
|
|
|
lifecycleCoroutineScopeImpl = new LifecycleCoroutineScopeImpl(lifecycle, CoroutineContext.Element.a.plus((g1) b, n.b.H()));
|
|
|
|
} while (!lifecycle.mInternalScopeRef.compareAndSet(null, lifecycleCoroutineScopeImpl));
|
|
|
|
lifecycleCoroutineScopeImpl.register();
|
|
|
|
return lifecycleCoroutineScopeImpl;
|
|
|
|
}
|
|
|
|
}
|