347 lines
8.5 KiB
Smali
347 lines
8.5 KiB
Smali
.class public final Landroidx/core/os/PersistableBundleKt;
|
|
.super Ljava/lang/Object;
|
|
.source "PersistableBundle.kt"
|
|
|
|
|
|
# direct methods
|
|
.method public static final varargs persistableBundleOf([Lkotlin/Pair;)Landroid/os/PersistableBundle;
|
|
.locals 9
|
|
.annotation build Landroidx/annotation/RequiresApi;
|
|
value = 0x15
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"([",
|
|
"Lkotlin/Pair<",
|
|
"Ljava/lang/String;",
|
|
"+",
|
|
"Ljava/lang/Object;",
|
|
">;)",
|
|
"Landroid/os/PersistableBundle;"
|
|
}
|
|
.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/PersistableBundle;
|
|
|
|
array-length v1, p0
|
|
|
|
invoke-direct {v0, v1}, Landroid/os/PersistableBundle;-><init>(I)V
|
|
|
|
array-length v1, p0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
:goto_0
|
|
if-ge v2, v1, :cond_f
|
|
|
|
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/PersistableBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_0
|
|
instance-of v5, v3, Ljava/lang/Boolean;
|
|
|
|
const/16 v6, 0x16
|
|
|
|
const/16 v7, 0x22
|
|
|
|
if-eqz v5, :cond_2
|
|
|
|
sget v5, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
if-lt v5, v6, :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/PersistableBundle;->putBoolean(Ljava/lang/String;Z)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_1
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, "Illegal value type boolean for key \""
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, v7}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p0, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p0, Ljava/lang/Throwable;
|
|
|
|
throw p0
|
|
|
|
:cond_2
|
|
instance-of v5, v3, Ljava/lang/Double;
|
|
|
|
if-eqz v5, :cond_3
|
|
|
|
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/PersistableBundle;->putDouble(Ljava/lang/String;D)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_3
|
|
instance-of v5, v3, Ljava/lang/Integer;
|
|
|
|
if-eqz v5, :cond_4
|
|
|
|
check-cast v3, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Number;->intValue()I
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/PersistableBundle;->putInt(Ljava/lang/String;I)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_4
|
|
instance-of v5, v3, Ljava/lang/Long;
|
|
|
|
if-eqz v5, :cond_5
|
|
|
|
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/PersistableBundle;->putLong(Ljava/lang/String;J)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_5
|
|
instance-of v5, v3, Ljava/lang/String;
|
|
|
|
if-eqz v5, :cond_6
|
|
|
|
check-cast v3, Ljava/lang/String;
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/PersistableBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_6
|
|
instance-of v5, v3, [Z
|
|
|
|
if-eqz v5, :cond_8
|
|
|
|
sget v5, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
if-lt v5, v6, :cond_7
|
|
|
|
check-cast v3, [Z
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/PersistableBundle;->putBooleanArray(Ljava/lang/String;[Z)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_7
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, "Illegal value type boolean[] for key \""
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, v7}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p0, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p0, Ljava/lang/Throwable;
|
|
|
|
throw p0
|
|
|
|
:cond_8
|
|
instance-of v5, v3, [D
|
|
|
|
if-eqz v5, :cond_9
|
|
|
|
check-cast v3, [D
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/PersistableBundle;->putDoubleArray(Ljava/lang/String;[D)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_9
|
|
instance-of v5, v3, [I
|
|
|
|
if-eqz v5, :cond_a
|
|
|
|
check-cast v3, [I
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/PersistableBundle;->putIntArray(Ljava/lang/String;[I)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_a
|
|
instance-of v5, v3, [J
|
|
|
|
if-eqz v5, :cond_b
|
|
|
|
check-cast v3, [J
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/PersistableBundle;->putLongArray(Ljava/lang/String;[J)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_b
|
|
instance-of v5, v3, [Ljava/lang/Object;
|
|
|
|
const-string v6, " for key \""
|
|
|
|
if-eqz v5, :cond_e
|
|
|
|
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, Ljava/lang/String;
|
|
|
|
invoke-virtual {v8, v5}, Ljava/lang/Class;->isAssignableFrom(Ljava/lang/Class;)Z
|
|
|
|
move-result v8
|
|
|
|
if-eqz v8, :cond_d
|
|
|
|
if-eqz v3, :cond_c
|
|
|
|
check-cast v3, [Ljava/lang/String;
|
|
|
|
invoke-virtual {v0, v4, v3}, Landroid/os/PersistableBundle;->putStringArray(Ljava/lang/String;[Ljava/lang/String;)V
|
|
|
|
:goto_1
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto/16 :goto_0
|
|
|
|
:cond_c
|
|
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_d
|
|
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, v6}, 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, v7}, 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_e
|
|
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, v6}, 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, v7}, 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_f
|
|
return-object v0
|
|
.end method
|