apkfuckery/com.discord/smali/androidx/lifecycle/LifecycleCoroutineScopeImpl.smali
2020-08-10 21:02:22 +00:00

172 lines
4.8 KiB
Smali

.class public final Landroidx/lifecycle/LifecycleCoroutineScopeImpl;
.super Landroidx/lifecycle/LifecycleCoroutineScope;
.source "Lifecycle.kt"
# interfaces
.implements Landroidx/lifecycle/LifecycleEventObserver;
# instance fields
.field public final coroutineContext:Lkotlin/coroutines/CoroutineContext;
.field public final lifecycle:Landroidx/lifecycle/Lifecycle;
# direct methods
.method public constructor <init>(Landroidx/lifecycle/Lifecycle;Lkotlin/coroutines/CoroutineContext;)V
.locals 1
const/4 v0, 0x0
if-eqz p1, :cond_2
if-eqz p2, :cond_1
invoke-direct {p0}, Landroidx/lifecycle/LifecycleCoroutineScope;-><init>()V
iput-object p1, p0, Landroidx/lifecycle/LifecycleCoroutineScopeImpl;->lifecycle:Landroidx/lifecycle/Lifecycle;
iput-object p2, p0, Landroidx/lifecycle/LifecycleCoroutineScopeImpl;->coroutineContext:Lkotlin/coroutines/CoroutineContext;
invoke-virtual {p0}, Landroidx/lifecycle/LifecycleCoroutineScopeImpl;->getLifecycle$lifecycle_runtime_ktx_release()Landroidx/lifecycle/Lifecycle;
move-result-object p1
invoke-virtual {p1}, Landroidx/lifecycle/Lifecycle;->getCurrentState()Landroidx/lifecycle/Lifecycle$State;
move-result-object p1
sget-object p2, Landroidx/lifecycle/Lifecycle$State;->DESTROYED:Landroidx/lifecycle/Lifecycle$State;
if-ne p1, p2, :cond_0
invoke-virtual {p0}, Landroidx/lifecycle/LifecycleCoroutineScopeImpl;->getCoroutineContext()Lkotlin/coroutines/CoroutineContext;
move-result-object p1
const/4 p2, 0x1
invoke-static {p1, v0, p2, v0}, Lf/n/a/k/a;->q(Lkotlin/coroutines/CoroutineContext;Ljava/util/concurrent/CancellationException;ILjava/lang/Object;)V
:cond_0
return-void
:cond_1
const-string p1, "coroutineContext"
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
throw v0
:cond_2
const-string p1, "lifecycle"
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
throw v0
.end method
# virtual methods
.method public getCoroutineContext()Lkotlin/coroutines/CoroutineContext;
.locals 1
iget-object v0, p0, Landroidx/lifecycle/LifecycleCoroutineScopeImpl;->coroutineContext:Lkotlin/coroutines/CoroutineContext;
return-object v0
.end method
.method public getLifecycle$lifecycle_runtime_ktx_release()Landroidx/lifecycle/Lifecycle;
.locals 1
iget-object v0, p0, Landroidx/lifecycle/LifecycleCoroutineScopeImpl;->lifecycle:Landroidx/lifecycle/Lifecycle;
return-object v0
.end method
.method public onStateChanged(Landroidx/lifecycle/LifecycleOwner;Landroidx/lifecycle/Lifecycle$Event;)V
.locals 1
const/4 v0, 0x0
if-eqz p1, :cond_2
if-eqz p2, :cond_1
invoke-virtual {p0}, Landroidx/lifecycle/LifecycleCoroutineScopeImpl;->getLifecycle$lifecycle_runtime_ktx_release()Landroidx/lifecycle/Lifecycle;
move-result-object p1
invoke-virtual {p1}, Landroidx/lifecycle/Lifecycle;->getCurrentState()Landroidx/lifecycle/Lifecycle$State;
move-result-object p1
sget-object p2, Landroidx/lifecycle/Lifecycle$State;->DESTROYED:Landroidx/lifecycle/Lifecycle$State;
invoke-virtual {p1, p2}, Ljava/lang/Enum;->compareTo(Ljava/lang/Enum;)I
move-result p1
if-gtz p1, :cond_0
invoke-virtual {p0}, Landroidx/lifecycle/LifecycleCoroutineScopeImpl;->getLifecycle$lifecycle_runtime_ktx_release()Landroidx/lifecycle/Lifecycle;
move-result-object p1
invoke-virtual {p1, p0}, Landroidx/lifecycle/Lifecycle;->removeObserver(Landroidx/lifecycle/LifecycleObserver;)V
invoke-virtual {p0}, Landroidx/lifecycle/LifecycleCoroutineScopeImpl;->getCoroutineContext()Lkotlin/coroutines/CoroutineContext;
move-result-object p1
const/4 p2, 0x1
invoke-static {p1, v0, p2, v0}, Lf/n/a/k/a;->q(Lkotlin/coroutines/CoroutineContext;Ljava/util/concurrent/CancellationException;ILjava/lang/Object;)V
:cond_0
return-void
:cond_1
const-string p1, "event"
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
throw v0
:cond_2
const-string p1, "source"
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
throw v0
.end method
.method public final register()V
.locals 7
invoke-static {}, Lk0/a/j0;->a()Lk0/a/f1;
move-result-object v0
invoke-virtual {v0}, Lk0/a/f1;->v()Lk0/a/f1;
move-result-object v2
new-instance v4, Landroidx/lifecycle/LifecycleCoroutineScopeImpl$register$1;
const/4 v0, 0x0
invoke-direct {v4, p0, v0}, Landroidx/lifecycle/LifecycleCoroutineScopeImpl$register$1;-><init>(Landroidx/lifecycle/LifecycleCoroutineScopeImpl;Lkotlin/coroutines/Continuation;)V
const/4 v3, 0x0
const/4 v5, 0x2
const/4 v6, 0x0
move-object v1, p0
invoke-static/range {v1 .. v6}, Lf/n/a/k/a;->M(Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;Lk0/a/z;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
return-void
.end method