Rabbit-R1/original r1/smali/smali_classes2/androidx/work/ArrayCreatingInputMerger.smali
2024-05-21 17:08:36 -04:00

375 lines
10 KiB
Smali

.class public final Landroidx/work/ArrayCreatingInputMerger;
.super Landroidx/work/InputMerger;
.source "ArrayCreatingInputMerger.kt"
# annotations
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u0000(\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010\u0000\n\u0002\u0008\u0003\n\u0002\u0018\u0002\n\u0002\u0008\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0000\u0018\u00002\u00020\u0001B\u0005\u00a2\u0006\u0002\u0010\u0002J&\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u00042\u0008\u0010\u0006\u001a\u0004\u0018\u00010\u00042\n\u0010\u0007\u001a\u0006\u0012\u0002\u0008\u00030\u0008H\u0002J\u0018\u0010\t\u001a\u00020\u00042\u0006\u0010\n\u001a\u00020\u00042\u0006\u0010\u000b\u001a\u00020\u0004H\u0002J\u001e\u0010\u000c\u001a\u00020\u00042\u0008\u0010\u0006\u001a\u0004\u0018\u00010\u00042\n\u0010\u0007\u001a\u0006\u0012\u0002\u0008\u00030\u0008H\u0002J\u0016\u0010\r\u001a\u00020\u000e2\u000c\u0010\u000f\u001a\u0008\u0012\u0004\u0012\u00020\u000e0\u0010H\u0016\u00a8\u0006\u0011"
}
d2 = {
"Landroidx/work/ArrayCreatingInputMerger;",
"Landroidx/work/InputMerger;",
"()V",
"concatenateArrayAndNonArray",
"",
"array",
"obj",
"valueClass",
"Ljava/lang/Class;",
"concatenateArrays",
"array1",
"array2",
"createArrayFor",
"merge",
"Landroidx/work/Data;",
"inputs",
"",
"work-runtime_release"
}
k = 0x1
mv = {
0x1,
0x8,
0x0
}
xi = 0x30
.end annotation
# direct methods
.method public constructor <init>()V
.locals 0
.line 40
invoke-direct {p0}, Landroidx/work/InputMerger;-><init>()V
return-void
.end method
.method private final concatenateArrayAndNonArray(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Object;",
"Ljava/lang/Object;",
"Ljava/lang/Class<",
"*>;)",
"Ljava/lang/Object;"
}
.end annotation
.line 93
invoke-static {p1}, Ljava/lang/reflect/Array;->getLength(Ljava/lang/Object;)I
move-result p0
add-int/lit8 v0, p0, 0x1
.line 94
invoke-static {p3, v0}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;I)Ljava/lang/Object;
move-result-object p3
const/4 v0, 0x0
.line 95
invoke-static {p1, v0, p3, v0, p0}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 96
invoke-static {p3, p0, p2}, Ljava/lang/reflect/Array;->set(Ljava/lang/Object;ILjava/lang/Object;)V
const-string p0, "newArray"
.line 97
invoke-static {p3, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
return-object p3
.end method
.method private final concatenateArrays(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.locals 3
.line 81
invoke-static {p1}, Ljava/lang/reflect/Array;->getLength(Ljava/lang/Object;)I
move-result p0
.line 82
invoke-static {p2}, Ljava/lang/reflect/Array;->getLength(Ljava/lang/Object;)I
move-result v0
.line 84
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/Class;->getComponentType()Ljava/lang/Class;
move-result-object v1
invoke-static {v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
add-int v2, p0, v0
.line 83
invoke-static {v1, v2}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;I)Ljava/lang/Object;
move-result-object v1
const/4 v2, 0x0
.line 87
invoke-static {p1, v2, v1, v2, p0}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 88
invoke-static {p2, v2, v1, p0, v0}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
const-string p0, "newArray"
.line 89
invoke-static {v1, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
return-object v1
.end method
.method private final createArrayFor(Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Object;",
"Ljava/lang/Class<",
"*>;)",
"Ljava/lang/Object;"
}
.end annotation
const/4 p0, 0x1
.line 101
invoke-static {p2, p0}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;I)Ljava/lang/Object;
move-result-object p0
const/4 p2, 0x0
.line 102
invoke-static {p0, p2, p1}, Ljava/lang/reflect/Array;->set(Ljava/lang/Object;ILjava/lang/Object;)V
const-string p1, "newArray"
.line 103
invoke-static {p0, p1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
return-object p0
.end method
# virtual methods
.method public merge(Ljava/util/List;)Landroidx/work/Data;
.locals 9
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List<",
"Landroidx/work/Data;",
">;)",
"Landroidx/work/Data;"
}
.end annotation
const-string v0, "inputs"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 43
new-instance v0, Landroidx/work/Data$Builder;
invoke-direct {v0}, Landroidx/work/Data$Builder;-><init>()V
.line 45
new-instance v1, Ljava/util/HashMap;
invoke-direct {v1}, Ljava/util/HashMap;-><init>()V
check-cast v1, Ljava/util/Map;
.line 46
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object p1
:cond_0
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_7
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Landroidx/work/Data;
.line 47
invoke-virtual {v2}, Landroidx/work/Data;->getKeyValueMap()Ljava/util/Map;
move-result-object v2
const-string v3, "input.keyValueMap"
invoke-static {v2, v3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-interface {v2}, Ljava/util/Map;->entrySet()Ljava/util/Set;
move-result-object v2
invoke-interface {v2}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v2
:goto_0
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v3
if-eqz v3, :cond_0
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v3
check-cast v3, Ljava/util/Map$Entry;
invoke-interface {v3}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v4
check-cast v4, Ljava/lang/String;
invoke-interface {v3}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object v3
if-eqz v3, :cond_1
.line 48
invoke-virtual {v3}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v5
if-nez v5, :cond_2
:cond_1
const-class v5, Ljava/lang/String;
.line 49
:cond_2
invoke-interface {v1, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v6
const-string v7, "key"
.line 50
invoke-static {v4, v7}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
if-nez v6, :cond_4
.line 52
invoke-virtual {v5}, Ljava/lang/Class;->isArray()Z
move-result v6
if-eqz v6, :cond_3
goto :goto_1
.line 57
:cond_3
invoke-direct {p0, v3, v5}, Landroidx/work/ArrayCreatingInputMerger;->createArrayFor(Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object;
move-result-object v3
goto :goto_1
.line 61
:cond_4
invoke-virtual {v6}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v7
.line 63
invoke-static {v7, v5}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v8
if-eqz v8, :cond_5
const-string v5, "value"
.line 65
invoke-static {v3, v5}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-direct {p0, v6, v3}, Landroidx/work/ArrayCreatingInputMerger;->concatenateArrays(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v3
goto :goto_1
.line 67
:cond_5
invoke-virtual {v7}, Ljava/lang/Class;->getComponentType()Ljava/lang/Class;
move-result-object v7
invoke-static {v7, v5}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v7
if-eqz v7, :cond_6
.line 69
invoke-direct {p0, v6, v3, v5}, Landroidx/work/ArrayCreatingInputMerger;->concatenateArrayAndNonArray(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object;
move-result-object v3
:goto_1
const-string v5, "if (existingValue == nul\u2026 }\n }"
.line 65
invoke-static {v3, v5}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
.line 50
invoke-interface {v1, v4, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
goto :goto_0
.line 71
:cond_6
new-instance p0, Ljava/lang/IllegalArgumentException;
invoke-direct {p0}, Ljava/lang/IllegalArgumentException;-><init>()V
throw p0
.line 76
:cond_7
invoke-virtual {v0, v1}, Landroidx/work/Data$Builder;->putAll(Ljava/util/Map;)Landroidx/work/Data$Builder;
.line 77
invoke-virtual {v0}, Landroidx/work/Data$Builder;->build()Landroidx/work/Data;
move-result-object p0
const-string p1, "output.build()"
invoke-static {p0, p1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
return-object p0
.end method