740 lines
16 KiB
Smali
740 lines
16 KiB
Smali
.class public Landroidx/work/impl/model/WorkTypeConverters;
|
|
.super Ljava/lang/Object;
|
|
.source "WorkTypeConverters.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Landroidx/work/impl/model/WorkTypeConverters$NetworkTypeIds;,
|
|
Landroidx/work/impl/model/WorkTypeConverters$BackoffPolicyIds;,
|
|
Landroidx/work/impl/model/WorkTypeConverters$StateIds;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static backoffPolicyToInt(Landroidx/work/BackoffPolicy;)I
|
|
.locals 3
|
|
.annotation build Landroidx/room/TypeConverter;
|
|
.end annotation
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
return v1
|
|
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/IllegalArgumentException;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "Could not convert "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p0, " to int"
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)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_1
|
|
const/4 p0, 0x0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static byteArrayToContentUriTriggers([B)Landroidx/work/ContentUriTriggers;
|
|
.locals 6
|
|
.annotation build Landroidx/room/TypeConverter;
|
|
.end annotation
|
|
|
|
new-instance v0, Landroidx/work/ContentUriTriggers;
|
|
|
|
invoke-direct {v0}, Landroidx/work/ContentUriTriggers;-><init>()V
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
new-instance v1, Ljava/io/ByteArrayInputStream;
|
|
|
|
invoke-direct {v1, p0}, Ljava/io/ByteArrayInputStream;-><init>([B)V
|
|
|
|
const/4 p0, 0x0
|
|
|
|
:try_start_0
|
|
new-instance v2, Ljava/io/ObjectInputStream;
|
|
|
|
invoke-direct {v2, v1}, Ljava/io/ObjectInputStream;-><init>(Ljava/io/InputStream;)V
|
|
:try_end_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_2
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
:try_start_1
|
|
invoke-virtual {v2}, Ljava/io/ObjectInputStream;->readInt()I
|
|
|
|
move-result p0
|
|
|
|
:goto_0
|
|
if-lez p0, :cond_1
|
|
|
|
invoke-virtual {v2}, Ljava/io/ObjectInputStream;->readUTF()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v3}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v2}, Ljava/io/ObjectInputStream;->readBoolean()Z
|
|
|
|
move-result v4
|
|
|
|
invoke-virtual {v0, v3, v4}, Landroidx/work/ContentUriTriggers;->add(Landroid/net/Uri;Z)V
|
|
:try_end_1
|
|
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_1
|
|
|
|
add-int/lit8 p0, p0, -0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
:try_start_2
|
|
invoke-virtual {v2}, Ljava/io/ObjectInputStream;->close()V
|
|
:try_end_2
|
|
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_0
|
|
|
|
goto :goto_1
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
invoke-virtual {p0}, Ljava/io/IOException;->printStackTrace()V
|
|
|
|
:goto_1
|
|
:try_start_3
|
|
invoke-virtual {v1}, Ljava/io/ByteArrayInputStream;->close()V
|
|
:try_end_3
|
|
.catch Ljava/io/IOException; {:try_start_3 .. :try_end_3} :catch_4
|
|
|
|
goto :goto_4
|
|
|
|
:catch_1
|
|
move-exception p0
|
|
|
|
goto :goto_2
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
move-object v2, p0
|
|
|
|
move-object p0, v0
|
|
|
|
goto :goto_5
|
|
|
|
:catch_2
|
|
move-exception v2
|
|
|
|
move-object v5, v2
|
|
|
|
move-object v2, p0
|
|
|
|
move-object p0, v5
|
|
|
|
:goto_2
|
|
:try_start_4
|
|
invoke-virtual {p0}, Ljava/io/IOException;->printStackTrace()V
|
|
:try_end_4
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_1
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
:try_start_5
|
|
invoke-virtual {v2}, Ljava/io/ObjectInputStream;->close()V
|
|
:try_end_5
|
|
.catch Ljava/io/IOException; {:try_start_5 .. :try_end_5} :catch_3
|
|
|
|
goto :goto_3
|
|
|
|
:catch_3
|
|
move-exception p0
|
|
|
|
invoke-virtual {p0}, Ljava/io/IOException;->printStackTrace()V
|
|
|
|
:cond_2
|
|
:goto_3
|
|
:try_start_6
|
|
invoke-virtual {v1}, Ljava/io/ByteArrayInputStream;->close()V
|
|
:try_end_6
|
|
.catch Ljava/io/IOException; {:try_start_6 .. :try_end_6} :catch_4
|
|
|
|
goto :goto_4
|
|
|
|
:catch_4
|
|
move-exception p0
|
|
|
|
invoke-virtual {p0}, Ljava/io/IOException;->printStackTrace()V
|
|
|
|
:goto_4
|
|
return-object v0
|
|
|
|
:catchall_1
|
|
move-exception p0
|
|
|
|
:goto_5
|
|
if-eqz v2, :cond_3
|
|
|
|
:try_start_7
|
|
invoke-virtual {v2}, Ljava/io/ObjectInputStream;->close()V
|
|
:try_end_7
|
|
.catch Ljava/io/IOException; {:try_start_7 .. :try_end_7} :catch_5
|
|
|
|
goto :goto_6
|
|
|
|
:catch_5
|
|
move-exception v0
|
|
|
|
invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V
|
|
|
|
:cond_3
|
|
:goto_6
|
|
:try_start_8
|
|
invoke-virtual {v1}, Ljava/io/ByteArrayInputStream;->close()V
|
|
:try_end_8
|
|
.catch Ljava/io/IOException; {:try_start_8 .. :try_end_8} :catch_6
|
|
|
|
goto :goto_7
|
|
|
|
:catch_6
|
|
move-exception v0
|
|
|
|
invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V
|
|
|
|
:goto_7
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static contentUriTriggersToByteArray(Landroidx/work/ContentUriTriggers;)[B
|
|
.locals 4
|
|
.annotation build Landroidx/room/TypeConverter;
|
|
.end annotation
|
|
|
|
invoke-virtual {p0}, Landroidx/work/ContentUriTriggers;->size()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-object v1
|
|
|
|
:cond_0
|
|
new-instance v0, Ljava/io/ByteArrayOutputStream;
|
|
|
|
invoke-direct {v0}, Ljava/io/ByteArrayOutputStream;-><init>()V
|
|
|
|
:try_start_0
|
|
new-instance v2, Ljava/io/ObjectOutputStream;
|
|
|
|
invoke-direct {v2, v0}, Ljava/io/ObjectOutputStream;-><init>(Ljava/io/OutputStream;)V
|
|
:try_end_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_2
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
:try_start_1
|
|
invoke-virtual {p0}, Landroidx/work/ContentUriTriggers;->size()I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {v2, v1}, Ljava/io/ObjectOutputStream;->writeInt(I)V
|
|
|
|
invoke-virtual {p0}, Landroidx/work/ContentUriTriggers;->getTriggers()Ljava/util/Set;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-interface {p0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p0
|
|
|
|
:goto_0
|
|
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Landroidx/work/ContentUriTriggers$Trigger;
|
|
|
|
invoke-virtual {v1}, Landroidx/work/ContentUriTriggers$Trigger;->getUri()Landroid/net/Uri;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Landroid/net/Uri;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v2, v3}, Ljava/io/ObjectOutputStream;->writeUTF(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1}, Landroidx/work/ContentUriTriggers$Trigger;->shouldTriggerForDescendants()Z
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {v2, v1}, Ljava/io/ObjectOutputStream;->writeBoolean(Z)V
|
|
:try_end_1
|
|
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
:try_start_2
|
|
invoke-virtual {v2}, Ljava/io/ObjectOutputStream;->close()V
|
|
:try_end_2
|
|
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_0
|
|
|
|
goto :goto_1
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
invoke-virtual {p0}, Ljava/io/IOException;->printStackTrace()V
|
|
|
|
:goto_1
|
|
:try_start_3
|
|
invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->close()V
|
|
:try_end_3
|
|
.catch Ljava/io/IOException; {:try_start_3 .. :try_end_3} :catch_4
|
|
|
|
goto :goto_4
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
goto :goto_5
|
|
|
|
:catch_1
|
|
move-exception p0
|
|
|
|
move-object v1, v2
|
|
|
|
goto :goto_2
|
|
|
|
:catchall_1
|
|
move-exception p0
|
|
|
|
move-object v2, v1
|
|
|
|
goto :goto_5
|
|
|
|
:catch_2
|
|
move-exception p0
|
|
|
|
:goto_2
|
|
:try_start_4
|
|
invoke-virtual {p0}, Ljava/io/IOException;->printStackTrace()V
|
|
:try_end_4
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
:try_start_5
|
|
invoke-virtual {v1}, Ljava/io/ObjectOutputStream;->close()V
|
|
:try_end_5
|
|
.catch Ljava/io/IOException; {:try_start_5 .. :try_end_5} :catch_3
|
|
|
|
goto :goto_3
|
|
|
|
:catch_3
|
|
move-exception p0
|
|
|
|
invoke-virtual {p0}, Ljava/io/IOException;->printStackTrace()V
|
|
|
|
:cond_2
|
|
:goto_3
|
|
:try_start_6
|
|
invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->close()V
|
|
:try_end_6
|
|
.catch Ljava/io/IOException; {:try_start_6 .. :try_end_6} :catch_4
|
|
|
|
goto :goto_4
|
|
|
|
:catch_4
|
|
move-exception p0
|
|
|
|
invoke-virtual {p0}, Ljava/io/IOException;->printStackTrace()V
|
|
|
|
:goto_4
|
|
invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:goto_5
|
|
if-eqz v2, :cond_3
|
|
|
|
:try_start_7
|
|
invoke-virtual {v2}, Ljava/io/ObjectOutputStream;->close()V
|
|
:try_end_7
|
|
.catch Ljava/io/IOException; {:try_start_7 .. :try_end_7} :catch_5
|
|
|
|
goto :goto_6
|
|
|
|
:catch_5
|
|
move-exception v1
|
|
|
|
invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V
|
|
|
|
:cond_3
|
|
:goto_6
|
|
:try_start_8
|
|
invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->close()V
|
|
:try_end_8
|
|
.catch Ljava/io/IOException; {:try_start_8 .. :try_end_8} :catch_6
|
|
|
|
goto :goto_7
|
|
|
|
:catch_6
|
|
move-exception v0
|
|
|
|
invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V
|
|
|
|
:goto_7
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static intToBackoffPolicy(I)Landroidx/work/BackoffPolicy;
|
|
.locals 3
|
|
.annotation build Landroidx/room/TypeConverter;
|
|
.end annotation
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-ne p0, v0, :cond_0
|
|
|
|
sget-object p0, Landroidx/work/BackoffPolicy;->LINEAR:Landroidx/work/BackoffPolicy;
|
|
|
|
return-object p0
|
|
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string v1, "Could not convert "
|
|
|
|
const-string v2, " to BackoffPolicy"
|
|
|
|
invoke-static {v1, p0, v2}, Le/e/b/a/a;->a(Ljava/lang/String;ILjava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
sget-object p0, Landroidx/work/BackoffPolicy;->EXPONENTIAL:Landroidx/work/BackoffPolicy;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static intToNetworkType(I)Landroidx/work/NetworkType;
|
|
.locals 3
|
|
.annotation build Landroidx/room/TypeConverter;
|
|
.end annotation
|
|
|
|
if-eqz p0, :cond_4
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-eq p0, v0, :cond_3
|
|
|
|
const/4 v0, 0x2
|
|
|
|
if-eq p0, v0, :cond_2
|
|
|
|
const/4 v0, 0x3
|
|
|
|
if-eq p0, v0, :cond_1
|
|
|
|
const/4 v0, 0x4
|
|
|
|
if-ne p0, v0, :cond_0
|
|
|
|
sget-object p0, Landroidx/work/NetworkType;->METERED:Landroidx/work/NetworkType;
|
|
|
|
return-object p0
|
|
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string v1, "Could not convert "
|
|
|
|
const-string v2, " to NetworkType"
|
|
|
|
invoke-static {v1, p0, v2}, Le/e/b/a/a;->a(Ljava/lang/String;ILjava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
sget-object p0, Landroidx/work/NetworkType;->NOT_ROAMING:Landroidx/work/NetworkType;
|
|
|
|
return-object p0
|
|
|
|
:cond_2
|
|
sget-object p0, Landroidx/work/NetworkType;->UNMETERED:Landroidx/work/NetworkType;
|
|
|
|
return-object p0
|
|
|
|
:cond_3
|
|
sget-object p0, Landroidx/work/NetworkType;->CONNECTED:Landroidx/work/NetworkType;
|
|
|
|
return-object p0
|
|
|
|
:cond_4
|
|
sget-object p0, Landroidx/work/NetworkType;->NOT_REQUIRED:Landroidx/work/NetworkType;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static intToState(I)Landroidx/work/WorkInfo$State;
|
|
.locals 3
|
|
.annotation build Landroidx/room/TypeConverter;
|
|
.end annotation
|
|
|
|
if-eqz p0, :cond_5
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-eq p0, v0, :cond_4
|
|
|
|
const/4 v0, 0x2
|
|
|
|
if-eq p0, v0, :cond_3
|
|
|
|
const/4 v0, 0x3
|
|
|
|
if-eq p0, v0, :cond_2
|
|
|
|
const/4 v0, 0x4
|
|
|
|
if-eq p0, v0, :cond_1
|
|
|
|
const/4 v0, 0x5
|
|
|
|
if-ne p0, v0, :cond_0
|
|
|
|
sget-object p0, Landroidx/work/WorkInfo$State;->CANCELLED:Landroidx/work/WorkInfo$State;
|
|
|
|
return-object p0
|
|
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string v1, "Could not convert "
|
|
|
|
const-string v2, " to State"
|
|
|
|
invoke-static {v1, p0, v2}, Le/e/b/a/a;->a(Ljava/lang/String;ILjava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
sget-object p0, Landroidx/work/WorkInfo$State;->BLOCKED:Landroidx/work/WorkInfo$State;
|
|
|
|
return-object p0
|
|
|
|
:cond_2
|
|
sget-object p0, Landroidx/work/WorkInfo$State;->FAILED:Landroidx/work/WorkInfo$State;
|
|
|
|
return-object p0
|
|
|
|
:cond_3
|
|
sget-object p0, Landroidx/work/WorkInfo$State;->SUCCEEDED:Landroidx/work/WorkInfo$State;
|
|
|
|
return-object p0
|
|
|
|
:cond_4
|
|
sget-object p0, Landroidx/work/WorkInfo$State;->RUNNING:Landroidx/work/WorkInfo$State;
|
|
|
|
return-object p0
|
|
|
|
:cond_5
|
|
sget-object p0, Landroidx/work/WorkInfo$State;->ENQUEUED:Landroidx/work/WorkInfo$State;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static networkTypeToInt(Landroidx/work/NetworkType;)I
|
|
.locals 3
|
|
.annotation build Landroidx/room/TypeConverter;
|
|
.end annotation
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
const/4 v1, 0x2
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
const/4 v1, 0x3
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
const/4 v1, 0x4
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
return v1
|
|
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/IllegalArgumentException;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "Could not convert "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p0, " to int"
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)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_1
|
|
return v1
|
|
|
|
:cond_2
|
|
const/4 p0, 0x0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static stateToInt(Landroidx/work/WorkInfo$State;)I
|
|
.locals 3
|
|
.annotation build Landroidx/room/TypeConverter;
|
|
.end annotation
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
const/4 v1, 0x2
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
const/4 v1, 0x3
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
const/4 v1, 0x4
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
const/4 v1, 0x5
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
return v1
|
|
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/IllegalArgumentException;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "Could not convert "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p0, " to int"
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)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_1
|
|
return v1
|
|
|
|
:cond_2
|
|
const/4 p0, 0x0
|
|
|
|
return p0
|
|
.end method
|