apkfuckery/com.discord/smali/androidx/lifecycle/LifecycleCoroutineScopeImpl.smali
2020-11-23 19:18:07 +00:00

152 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 private final coroutineContext:Lkotlin/coroutines/CoroutineContext;
.field private final lifecycle:Landroidx/lifecycle/Lifecycle;
# direct methods
.method public constructor <init>(Landroidx/lifecycle/Lifecycle;Lkotlin/coroutines/CoroutineContext;)V
.locals 1
const-string v0, "lifecycle"
invoke-static {p1, v0}, Ly/m/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "coroutineContext"
invoke-static {p2, v0}, Ly/m/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
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
const/4 v0, 0x0
invoke-static {p1, v0, p2, v0}, Lz/a/g0;->k(Lkotlin/coroutines/CoroutineContext;Ljava/util/concurrent/CancellationException;ILjava/lang/Object;)V
:cond_0
return-void
.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-string/jumbo v0, "source"
invoke-static {p1, v0}, Ly/m/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
const-string p1, "event"
invoke-static {p2, p1}, Ly/m/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
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
const/4 v0, 0x0
invoke-static {p1, v0, p2, v0}, Lz/a/g0;->k(Lkotlin/coroutines/CoroutineContext;Ljava/util/concurrent/CancellationException;ILjava/lang/Object;)V
:cond_0
return-void
.end method
.method public final register()V
.locals 7
sget-object v0, Lz/a/h0;->a:Lz/a/v;
sget-object v0, Lz/a/s1/j;->b:Lz/a/e1;
invoke-virtual {v0}, Lz/a/e1;->t()Lz/a/e1;
move-result-object v2
const/4 v3, 0x0
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 v5, 0x2
const/4 v6, 0x0
move-object v1, p0
invoke-static/range {v1 .. v6}, Lf/h/a/f/f/n/f;->N(Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;Lz/a/x;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
return-void
.end method