540 lines
12 KiB
Smali
540 lines
12 KiB
Smali
.class public final Landroidx/core/os/BundleKt;
|
|
.super Ljava/lang/Object;
|
|
.source "Bundle.kt"
|
|
|
|
|
|
# direct methods
|
|
.method public static final varargs bundleOf([Lkotlin/Pair;)Landroid/os/Bundle;
|
|
.locals 9
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"([",
|
|
"Lkotlin/Pair<",
|
|
"Ljava/lang/String;",
|
|
"+",
|
|
"Ljava/lang/Object;",
|
|
">;)",
|
|
"Landroid/os/Bundle;"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "pairs"
|
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v0, Landroid/os/Bundle;
|
|
|
|
array-length v1, p0
|
|
|
|
invoke-direct {v0, v1}, Landroid/os/Bundle;-><init>(I)V
|
|
|
|
array-length v1, p0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
:goto_0
|
|
if-ge v2, v1, :cond_20
|
|
|
|
aget-object v3, p0, v2
|
|
|
|
iget-object v4, v3, Lkotlin/Pair;->first:Ljava/lang/Object;
|
|
|
|
check-cast v4, Ljava/lang/String;
|
|
|
|
iget-object v3, v3, Lkotlin/Pair;->second:Ljava/lang/Object;
|
|
|
|
if-nez v3, :cond_0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_0
|
|
instance-of v5, v3, Ljava/lang/Boolean;
|
|
|
|
if-eqz v5, :cond_1
|
|
|
|
check-cast v3, Ljava/lang/Boolean;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_1
|
|
instance-of v5, v3, Ljava/lang/Byte;
|
|
|
|
if-eqz v5, :cond_2
|
|
|
|
check-cast v3, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Number;->byteValue()B
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putByte(Ljava/lang/String;B)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_2
|
|
instance-of v5, v3, Ljava/lang/Character;
|
|
|
|
if-eqz v5, :cond_3
|
|
|
|
check-cast v3, Ljava/lang/Character;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Character;->charValue()C
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putChar(Ljava/lang/String;C)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_3
|
|
instance-of v5, v3, Ljava/lang/Double;
|
|
|
|
if-eqz v5, :cond_4
|
|
|
|
check-cast v3, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Number;->doubleValue()D
|
|
|
|
move-result-wide v5
|
|
|
|
invoke-virtual {v0, v4, v5, v6}, Landroid/os/Bundle;->putDouble(Ljava/lang/String;D)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_4
|
|
instance-of v5, v3, Ljava/lang/Float;
|
|
|
|
if-eqz v5, :cond_5
|
|
|
|
check-cast v3, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Number;->floatValue()F
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putFloat(Ljava/lang/String;F)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_5
|
|
instance-of v5, v3, Ljava/lang/Integer;
|
|
|
|
if-eqz v5, :cond_6
|
|
|
|
check-cast v3, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Number;->intValue()I
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_6
|
|
instance-of v5, v3, Ljava/lang/Long;
|
|
|
|
if-eqz v5, :cond_7
|
|
|
|
check-cast v3, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v5
|
|
|
|
invoke-virtual {v0, v4, v5, v6}, Landroid/os/Bundle;->putLong(Ljava/lang/String;J)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_7
|
|
instance-of v5, v3, Ljava/lang/Short;
|
|
|
|
if-eqz v5, :cond_8
|
|
|
|
check-cast v3, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Number;->shortValue()S
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putShort(Ljava/lang/String;S)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_8
|
|
instance-of v5, v3, Landroid/os/Bundle;
|
|
|
|
if-eqz v5, :cond_9
|
|
|
|
check-cast v3, Landroid/os/Bundle;
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putBundle(Ljava/lang/String;Landroid/os/Bundle;)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_9
|
|
instance-of v5, v3, Ljava/lang/CharSequence;
|
|
|
|
if-eqz v5, :cond_a
|
|
|
|
check-cast v3, Ljava/lang/CharSequence;
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putCharSequence(Ljava/lang/String;Ljava/lang/CharSequence;)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_a
|
|
instance-of v5, v3, Landroid/os/Parcelable;
|
|
|
|
if-eqz v5, :cond_b
|
|
|
|
check-cast v3, Landroid/os/Parcelable;
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putParcelable(Ljava/lang/String;Landroid/os/Parcelable;)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_b
|
|
instance-of v5, v3, [Z
|
|
|
|
if-eqz v5, :cond_c
|
|
|
|
check-cast v3, [Z
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putBooleanArray(Ljava/lang/String;[Z)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_c
|
|
instance-of v5, v3, [B
|
|
|
|
if-eqz v5, :cond_d
|
|
|
|
check-cast v3, [B
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putByteArray(Ljava/lang/String;[B)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_d
|
|
instance-of v5, v3, [C
|
|
|
|
if-eqz v5, :cond_e
|
|
|
|
check-cast v3, [C
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putCharArray(Ljava/lang/String;[C)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_e
|
|
instance-of v5, v3, [D
|
|
|
|
if-eqz v5, :cond_f
|
|
|
|
check-cast v3, [D
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putDoubleArray(Ljava/lang/String;[D)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_f
|
|
instance-of v5, v3, [F
|
|
|
|
if-eqz v5, :cond_10
|
|
|
|
check-cast v3, [F
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putFloatArray(Ljava/lang/String;[F)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_10
|
|
instance-of v5, v3, [I
|
|
|
|
if-eqz v5, :cond_11
|
|
|
|
check-cast v3, [I
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putIntArray(Ljava/lang/String;[I)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_11
|
|
instance-of v5, v3, [J
|
|
|
|
if-eqz v5, :cond_12
|
|
|
|
check-cast v3, [J
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putLongArray(Ljava/lang/String;[J)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_12
|
|
instance-of v5, v3, [S
|
|
|
|
if-eqz v5, :cond_13
|
|
|
|
check-cast v3, [S
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putShortArray(Ljava/lang/String;[S)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_13
|
|
instance-of v5, v3, [Ljava/lang/Object;
|
|
|
|
const/16 v6, 0x22
|
|
|
|
const-string v7, " for key \""
|
|
|
|
if-eqz v5, :cond_1b
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v5}, Ljava/lang/Class;->getComponentType()Ljava/lang/Class;
|
|
|
|
move-result-object v5
|
|
|
|
const-class v8, Landroid/os/Parcelable;
|
|
|
|
invoke-virtual {v8, v5}, Ljava/lang/Class;->isAssignableFrom(Ljava/lang/Class;)Z
|
|
|
|
move-result v8
|
|
|
|
if-eqz v8, :cond_15
|
|
|
|
if-eqz v3, :cond_14
|
|
|
|
check-cast v3, [Landroid/os/Parcelable;
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putParcelableArray(Ljava/lang/String;[Landroid/os/Parcelable;)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_14
|
|
new-instance p0, Lkotlin/r;
|
|
|
|
const-string v0, "null cannot be cast to non-null type kotlin.Array<android.os.Parcelable>"
|
|
|
|
invoke-direct {p0, v0}, Lkotlin/r;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
|
|
:cond_15
|
|
const-class v8, Ljava/lang/String;
|
|
|
|
invoke-virtual {v8, v5}, Ljava/lang/Class;->isAssignableFrom(Ljava/lang/Class;)Z
|
|
|
|
move-result v8
|
|
|
|
if-eqz v8, :cond_17
|
|
|
|
if-eqz v3, :cond_16
|
|
|
|
check-cast v3, [Ljava/lang/String;
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putStringArray(Ljava/lang/String;[Ljava/lang/String;)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_16
|
|
new-instance p0, Lkotlin/r;
|
|
|
|
const-string v0, "null cannot be cast to non-null type kotlin.Array<kotlin.String>"
|
|
|
|
invoke-direct {p0, v0}, Lkotlin/r;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
|
|
:cond_17
|
|
const-class v8, Ljava/lang/CharSequence;
|
|
|
|
invoke-virtual {v8, v5}, Ljava/lang/Class;->isAssignableFrom(Ljava/lang/Class;)Z
|
|
|
|
move-result v8
|
|
|
|
if-eqz v8, :cond_19
|
|
|
|
if-eqz v3, :cond_18
|
|
|
|
check-cast v3, [Ljava/lang/CharSequence;
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putCharSequenceArray(Ljava/lang/String;[Ljava/lang/CharSequence;)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_18
|
|
new-instance p0, Lkotlin/r;
|
|
|
|
const-string v0, "null cannot be cast to non-null type kotlin.Array<kotlin.CharSequence>"
|
|
|
|
invoke-direct {p0, v0}, Lkotlin/r;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
|
|
:cond_19
|
|
const-class v8, Ljava/io/Serializable;
|
|
|
|
invoke-virtual {v8, v5}, Ljava/lang/Class;->isAssignableFrom(Ljava/lang/Class;)Z
|
|
|
|
move-result v8
|
|
|
|
if-eqz v8, :cond_1a
|
|
|
|
check-cast v3, Ljava/io/Serializable;
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putSerializable(Ljava/lang/String;Ljava/io/Serializable;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1a
|
|
const-string p0, "componentType"
|
|
|
|
invoke-static {v5, p0}, Lkotlin/jvm/internal/k;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v5}, Ljava/lang/Class;->getCanonicalName()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance v0, Ljava/lang/IllegalArgumentException;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, "Illegal value array type "
|
|
|
|
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v6}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast v0, Ljava/lang/Throwable;
|
|
|
|
throw v0
|
|
|
|
:cond_1b
|
|
instance-of v5, v3, Ljava/io/Serializable;
|
|
|
|
if-eqz v5, :cond_1c
|
|
|
|
check-cast v3, Ljava/io/Serializable;
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putSerializable(Ljava/lang/String;Ljava/io/Serializable;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1c
|
|
sget v5, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v8, 0x12
|
|
|
|
if-lt v5, v8, :cond_1d
|
|
|
|
instance-of v5, v3, Landroid/os/Binder;
|
|
|
|
if-eqz v5, :cond_1d
|
|
|
|
check-cast v3, Landroid/os/IBinder;
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putBinder(Ljava/lang/String;Landroid/os/IBinder;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1d
|
|
sget v5, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v8, 0x15
|
|
|
|
if-lt v5, v8, :cond_1e
|
|
|
|
instance-of v5, v3, Landroid/util/Size;
|
|
|
|
if-eqz v5, :cond_1e
|
|
|
|
check-cast v3, Landroid/util/Size;
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putSize(Ljava/lang/String;Landroid/util/Size;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1e
|
|
sget v5, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
if-lt v5, v8, :cond_1f
|
|
|
|
instance-of v5, v3, Landroid/util/SizeF;
|
|
|
|
if-eqz v5, :cond_1f
|
|
|
|
check-cast v3, Landroid/util/SizeF;
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/Bundle;->putSizeF(Ljava/lang/String;Landroid/util/SizeF;)V
|
|
|
|
:goto_1
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto/16 :goto_0
|
|
|
|
:cond_1f
|
|
invoke-virtual {v3}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Class;->getCanonicalName()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance v0, Ljava/lang/IllegalArgumentException;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, "Illegal value type "
|
|
|
|
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v6}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast v0, Ljava/lang/Throwable;
|
|
|
|
throw v0
|
|
|
|
:cond_20
|
|
return-object v0
|
|
.end method
|