Rabbit-R1/android (non root)/smali/smali_classes2/androidx/lifecycle/viewmodel/InitializerViewModelFactory.smali
2024-05-21 17:08:36 -04:00

190 lines
6.2 KiB
Smali

.class public final Landroidx/lifecycle/viewmodel/InitializerViewModelFactory;
.super Ljava/lang/Object;
.source "InitializerViewModelFactory.kt"
# interfaces
.implements Landroidx/lifecycle/ViewModelProvider$Factory;
# annotations
.annotation system Ldalvik/annotation/SourceDebugExtension;
value = "SMAP\nInitializerViewModelFactory.kt\nKotlin\n*S Kotlin\n*F\n+ 1 InitializerViewModelFactory.kt\nandroidx/lifecycle/viewmodel/InitializerViewModelFactory\n+ 2 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n*L\n1#1,115:1\n13579#2,2:116\n*S KotlinDebug\n*F\n+ 1 InitializerViewModelFactory.kt\nandroidx/lifecycle/viewmodel/InitializerViewModelFactory\n*L\n105#1:116,2\n*E\n"
.end annotation
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u0000*\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0011\n\u0002\u0018\u0002\n\u0002\u0008\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\u0008\u0000\u0018\u00002\u00020\u0001B!\u0012\u001a\u0010\u0002\u001a\u000e\u0012\n\u0008\u0001\u0012\u0006\u0012\u0002\u0008\u00030\u00040\u0003\"\u0006\u0012\u0002\u0008\u00030\u0004\u00a2\u0006\u0002\u0010\u0005J-\u0010\u0007\u001a\u0002H\u0008\"\u0008\u0008\u0000\u0010\u0008*\u00020\t2\u000c\u0010\n\u001a\u0008\u0012\u0004\u0012\u0002H\u00080\u000b2\u0006\u0010\u000c\u001a\u00020\rH\u0016\u00a2\u0006\u0002\u0010\u000eR\u001c\u0010\u0002\u001a\u000e\u0012\n\u0008\u0001\u0012\u0006\u0012\u0002\u0008\u00030\u00040\u0003X\u0082\u0004\u00a2\u0006\u0004\n\u0002\u0010\u0006\u00a8\u0006\u000f"
}
d2 = {
"Landroidx/lifecycle/viewmodel/InitializerViewModelFactory;",
"Landroidx/lifecycle/ViewModelProvider$Factory;",
"initializers",
"",
"Landroidx/lifecycle/viewmodel/ViewModelInitializer;",
"([Landroidx/lifecycle/viewmodel/ViewModelInitializer;)V",
"[Landroidx/lifecycle/viewmodel/ViewModelInitializer;",
"create",
"T",
"Landroidx/lifecycle/ViewModel;",
"modelClass",
"Ljava/lang/Class;",
"extras",
"Landroidx/lifecycle/viewmodel/CreationExtras;",
"(Ljava/lang/Class;Landroidx/lifecycle/viewmodel/CreationExtras;)Landroidx/lifecycle/ViewModel;",
"lifecycle-viewmodel_release"
}
k = 0x1
mv = {
0x1,
0x8,
0x0
}
xi = 0x30
.end annotation
# instance fields
.field private final initializers:[Landroidx/lifecycle/viewmodel/ViewModelInitializer;
.annotation system Ldalvik/annotation/Signature;
value = {
"[",
"Landroidx/lifecycle/viewmodel/ViewModelInitializer<",
"*>;"
}
.end annotation
.end field
# direct methods
.method public varargs constructor <init>([Landroidx/lifecycle/viewmodel/ViewModelInitializer;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"([",
"Landroidx/lifecycle/viewmodel/ViewModelInitializer<",
"*>;)V"
}
.end annotation
const-string v0, "initializers"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 86
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Landroidx/lifecycle/viewmodel/InitializerViewModelFactory;->initializers:[Landroidx/lifecycle/viewmodel/ViewModelInitializer;
return-void
.end method
# virtual methods
.method public create(Ljava/lang/Class;Landroidx/lifecycle/viewmodel/CreationExtras;)Landroidx/lifecycle/ViewModel;
.locals 6
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Landroidx/lifecycle/ViewModel;",
">(",
"Ljava/lang/Class<",
"TT;>;",
"Landroidx/lifecycle/viewmodel/CreationExtras;",
")TT;"
}
.end annotation
const-string v0, "modelClass"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "extras"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
iget-object p0, p0, Landroidx/lifecycle/viewmodel/InitializerViewModelFactory;->initializers:[Landroidx/lifecycle/viewmodel/ViewModelInitializer;
.line 116
array-length v0, p0
const/4 v1, 0x0
const/4 v2, 0x0
move-object v3, v1
:goto_0
if-ge v2, v0, :cond_2
aget-object v4, p0, v2
.line 106
invoke-virtual {v4}, Landroidx/lifecycle/viewmodel/ViewModelInitializer;->getClazz$lifecycle_viewmodel_release()Ljava/lang/Class;
move-result-object v5
invoke-static {v5, p1}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v5
if-eqz v5, :cond_1
.line 107
invoke-virtual {v4}, Landroidx/lifecycle/viewmodel/ViewModelInitializer;->getInitializer$lifecycle_viewmodel_release()Lkotlin/jvm/functions/Function1;
move-result-object v3
invoke-interface {v3, p2}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v3
instance-of v4, v3, Landroidx/lifecycle/ViewModel;
if-eqz v4, :cond_0
check-cast v3, Landroidx/lifecycle/ViewModel;
goto :goto_1
:cond_0
move-object v3, v1
:cond_1
:goto_1
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_2
if-eqz v3, :cond_3
return-object v3
.line 110
:cond_3
new-instance p0, Ljava/lang/IllegalArgumentException;
.line 111
new-instance p2, Ljava/lang/StringBuilder;
const-string v0, "No initializer set for given class "
invoke-direct {p2, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p1}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object p1
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
.line 110
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
.end method