apkfuckery/com.discord/smali/androidx/lifecycle/LifecycleKt.smali
2020-10-05 23:18:16 +00:00

61 lines
1.9 KiB
Smali

.class public final Landroidx/lifecycle/LifecycleKt;
.super Ljava/lang/Object;
.source "Lifecycle.kt"
# direct methods
.method public static final getCoroutineScope(Landroidx/lifecycle/Lifecycle;)Landroidx/lifecycle/LifecycleCoroutineScope;
.locals 4
const-string v0, "$this$coroutineScope"
invoke-static {p0, v0}, Lc0/n/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
:cond_0
iget-object v0, p0, Landroidx/lifecycle/Lifecycle;->mInternalScopeRef:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroidx/lifecycle/LifecycleCoroutineScopeImpl;
if-eqz v0, :cond_1
return-object v0
:cond_1
new-instance v0, Landroidx/lifecycle/LifecycleCoroutineScopeImpl;
new-instance v1, Ld0/a/j1;
const/4 v2, 0x0
invoke-direct {v1, v2}, Ld0/a/j1;-><init>(Lkotlinx/coroutines/Job;)V
invoke-static {}, Ld0/a/g0;->a()Ld0/a/d1;
move-result-object v3
invoke-virtual {v3}, Ld0/a/d1;->t()Ld0/a/d1;
move-result-object v3
invoke-static {v1, v3}, Lkotlin/coroutines/CoroutineContext$a$a;->plus(Lkotlin/coroutines/CoroutineContext$a;Lkotlin/coroutines/CoroutineContext;)Lkotlin/coroutines/CoroutineContext;
move-result-object v1
invoke-direct {v0, p0, v1}, Landroidx/lifecycle/LifecycleCoroutineScopeImpl;-><init>(Landroidx/lifecycle/Lifecycle;Lkotlin/coroutines/CoroutineContext;)V
iget-object v1, p0, Landroidx/lifecycle/Lifecycle;->mInternalScopeRef:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {v1, v2, v0}, Ljava/util/concurrent/atomic/AtomicReference;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_0
invoke-virtual {v0}, Landroidx/lifecycle/LifecycleCoroutineScopeImpl;->register()V
return-object v0
.end method