69 lines
1.9 KiB
Smali
69 lines
1.9 KiB
Smali
.class public final Landroidx/lifecycle/ViewModelKt;
|
|
.super Ljava/lang/Object;
|
|
.source "ViewModel.kt"
|
|
|
|
|
|
# static fields
|
|
.field public static final JOB_KEY:Ljava/lang/String; = "androidx.lifecycle.ViewModelCoroutineScope.JOB_KEY"
|
|
|
|
|
|
# direct methods
|
|
.method public static final getViewModelScope(Landroidx/lifecycle/ViewModel;)Lkotlinx/coroutines/CoroutineScope;
|
|
.locals 4
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
const-string v1, "androidx.lifecycle.ViewModelCoroutineScope.JOB_KEY"
|
|
|
|
invoke-virtual {p0, v1}, Landroidx/lifecycle/ViewModel;->getTag(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lkotlinx/coroutines/CoroutineScope;
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
return-object v2
|
|
|
|
:cond_0
|
|
new-instance v2, Landroidx/lifecycle/CloseableCoroutineScope;
|
|
|
|
new-instance v3, Lk0/a/q1;
|
|
|
|
invoke-direct {v3, v0}, Lk0/a/q1;-><init>(Lkotlinx/coroutines/Job;)V
|
|
|
|
invoke-static {}, Lk0/a/l0;->a()Lk0/a/i1;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lk0/a/i1;->s()Lk0/a/i1;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v3, v0}, Lk0/a/f1;->plus(Lkotlin/coroutines/CoroutineContext;)Lkotlin/coroutines/CoroutineContext;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {v2, v0}, Landroidx/lifecycle/CloseableCoroutineScope;-><init>(Lkotlin/coroutines/CoroutineContext;)V
|
|
|
|
invoke-virtual {p0, v1, v2}, Landroidx/lifecycle/ViewModel;->setTagIfAbsent(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v0, "setTagIfAbsent(JOB_KEY,\n\u2026patchers.Main.immediate))"
|
|
|
|
invoke-static {p0, v0}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p0, Lkotlinx/coroutines/CoroutineScope;
|
|
|
|
return-object p0
|
|
|
|
:cond_1
|
|
const-string p0, "$this$viewModelScope"
|
|
|
|
invoke-static {p0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|