347 lines
8.6 KiB
Smali
347 lines
8.6 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 10
|
|
.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/4 v0, 0x0
|
|
|
|
if-eqz p0, :cond_10
|
|
|
|
new-instance v1, Landroid/os/PersistableBundle;
|
|
|
|
array-length v2, p0
|
|
|
|
invoke-direct {v1, v2}, Landroid/os/PersistableBundle;-><init>(I)V
|
|
|
|
array-length v2, p0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
:goto_0
|
|
if-ge v3, v2, :cond_f
|
|
|
|
aget-object v4, p0, v3
|
|
|
|
iget-object v5, v4, Lkotlin/Pair;->first:Ljava/lang/Object;
|
|
|
|
check-cast v5, Ljava/lang/String;
|
|
|
|
iget-object v4, v4, Lkotlin/Pair;->second:Ljava/lang/Object;
|
|
|
|
if-nez v4, :cond_0
|
|
|
|
invoke-virtual {v1, v5, v0}, Landroid/os/PersistableBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_0
|
|
instance-of v6, v4, Ljava/lang/Boolean;
|
|
|
|
const/16 v7, 0x16
|
|
|
|
const/16 v8, 0x22
|
|
|
|
if-eqz v6, :cond_2
|
|
|
|
sget v6, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
if-lt v6, v7, :cond_1
|
|
|
|
check-cast v4, Ljava/lang/Boolean;
|
|
|
|
invoke-virtual {v4}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
move-result v4
|
|
|
|
invoke-virtual {v1, v5, v4}, 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;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "Illegal value type boolean for key \""
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, v8}, 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
|
|
|
|
throw p0
|
|
|
|
:cond_2
|
|
instance-of v6, v4, Ljava/lang/Double;
|
|
|
|
if-eqz v6, :cond_3
|
|
|
|
check-cast v4, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v4}, Ljava/lang/Number;->doubleValue()D
|
|
|
|
move-result-wide v6
|
|
|
|
invoke-virtual {v1, v5, v6, v7}, Landroid/os/PersistableBundle;->putDouble(Ljava/lang/String;D)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_3
|
|
instance-of v6, v4, Ljava/lang/Integer;
|
|
|
|
if-eqz v6, :cond_4
|
|
|
|
check-cast v4, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v4}, Ljava/lang/Number;->intValue()I
|
|
|
|
move-result v4
|
|
|
|
invoke-virtual {v1, v5, v4}, Landroid/os/PersistableBundle;->putInt(Ljava/lang/String;I)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_4
|
|
instance-of v6, v4, Ljava/lang/Long;
|
|
|
|
if-eqz v6, :cond_5
|
|
|
|
check-cast v4, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v4}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v6
|
|
|
|
invoke-virtual {v1, v5, v6, v7}, Landroid/os/PersistableBundle;->putLong(Ljava/lang/String;J)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_5
|
|
instance-of v6, v4, Ljava/lang/String;
|
|
|
|
if-eqz v6, :cond_6
|
|
|
|
check-cast v4, Ljava/lang/String;
|
|
|
|
invoke-virtual {v1, v5, v4}, Landroid/os/PersistableBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_6
|
|
instance-of v6, v4, [Z
|
|
|
|
if-eqz v6, :cond_8
|
|
|
|
sget v6, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
if-lt v6, v7, :cond_7
|
|
|
|
check-cast v4, [Z
|
|
|
|
invoke-virtual {v1, v5, v4}, 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;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "Illegal value type boolean[] for key \""
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, v8}, 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
|
|
|
|
throw p0
|
|
|
|
:cond_8
|
|
instance-of v6, v4, [D
|
|
|
|
if-eqz v6, :cond_9
|
|
|
|
check-cast v4, [D
|
|
|
|
invoke-virtual {v1, v5, v4}, Landroid/os/PersistableBundle;->putDoubleArray(Ljava/lang/String;[D)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_9
|
|
instance-of v6, v4, [I
|
|
|
|
if-eqz v6, :cond_a
|
|
|
|
check-cast v4, [I
|
|
|
|
invoke-virtual {v1, v5, v4}, Landroid/os/PersistableBundle;->putIntArray(Ljava/lang/String;[I)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_a
|
|
instance-of v6, v4, [J
|
|
|
|
if-eqz v6, :cond_b
|
|
|
|
check-cast v4, [J
|
|
|
|
invoke-virtual {v1, v5, v4}, Landroid/os/PersistableBundle;->putLongArray(Ljava/lang/String;[J)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_b
|
|
instance-of v6, v4, [Ljava/lang/Object;
|
|
|
|
const-string v7, " for key \""
|
|
|
|
if-eqz v6, :cond_e
|
|
|
|
invoke-virtual {v4}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v6}, Ljava/lang/Class;->getComponentType()Ljava/lang/Class;
|
|
|
|
move-result-object v6
|
|
|
|
if-eqz v6, :cond_d
|
|
|
|
const-string v9, "value::class.java.componentType!!"
|
|
|
|
invoke-static {v6, v9}, Lk0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-class v9, Ljava/lang/String;
|
|
|
|
invoke-virtual {v9, v6}, Ljava/lang/Class;->isAssignableFrom(Ljava/lang/Class;)Z
|
|
|
|
move-result v9
|
|
|
|
if-eqz v9, :cond_c
|
|
|
|
check-cast v4, [Ljava/lang/String;
|
|
|
|
invoke-virtual {v1, v5, v4}, Landroid/os/PersistableBundle;->putStringArray(Ljava/lang/String;[Ljava/lang/String;)V
|
|
|
|
:goto_1
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
goto/16 :goto_0
|
|
|
|
:cond_c
|
|
invoke-virtual {v6}, Ljava/lang/Class;->getCanonicalName()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance v0, Ljava/lang/IllegalArgumentException;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "Illegal value array type "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
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, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v8}, 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
|
|
|
|
throw v0
|
|
|
|
:cond_d
|
|
invoke-static {}, Lk0/n/c/h;->throwNpe()V
|
|
|
|
throw v0
|
|
|
|
:cond_e
|
|
invoke-virtual {v4}, 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;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "Illegal value type "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
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, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v8}, 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
|
|
|
|
throw v0
|
|
|
|
:cond_f
|
|
return-object v1
|
|
|
|
:cond_10
|
|
const-string p0, "pairs"
|
|
|
|
invoke-static {p0}, Lk0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|