Rabbit-R1/android (non root)/smali/smali_classes3/okhttp3/internal/http/StatusLine$Companion.smali
2024-05-21 17:08:36 -04:00

386 lines
9.6 KiB
Smali

.class public final Lokhttp3/internal/http/StatusLine$Companion;
.super Ljava/lang/Object;
.source "StatusLine.kt"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http/StatusLine;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "Companion"
.end annotation
.annotation runtime Lkotlin/Metadata;
bv = {
0x1,
0x0,
0x3
}
d1 = {
"\u0000(\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0008\u0002\n\u0002\u0010\u0008\n\u0002\u0008\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010\u000e\n\u0000\u0008\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\u0008\u0002\u00a2\u0006\u0002\u0010\u0002J\u000e\u0010\u0008\u001a\u00020\t2\u0006\u0010\n\u001a\u00020\u000bJ\u000e\u0010\u000c\u001a\u00020\t2\u0006\u0010\r\u001a\u00020\u000eR\u000e\u0010\u0003\u001a\u00020\u0004X\u0086T\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0004X\u0086T\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0004X\u0086T\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0007\u001a\u00020\u0004X\u0086T\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u000f"
}
d2 = {
"Lokhttp3/internal/http/StatusLine$Companion;",
"",
"()V",
"HTTP_CONTINUE",
"",
"HTTP_MISDIRECTED_REQUEST",
"HTTP_PERM_REDIRECT",
"HTTP_TEMP_REDIRECT",
"get",
"Lokhttp3/internal/http/StatusLine;",
"response",
"Lokhttp3/Response;",
"parse",
"statusLine",
"",
"okhttp"
}
k = 0x1
mv = {
0x1,
0x4,
0x0
}
.end annotation
# direct methods
.method private constructor <init>()V
.locals 0
.line 42
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public synthetic constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
.locals 0
.line 42
invoke-direct {p0}, Lokhttp3/internal/http/StatusLine$Companion;-><init>()V
return-void
.end method
# virtual methods
.method public final get(Lokhttp3/Response;)Lokhttp3/internal/http/StatusLine;
.locals 2
const-string p0, "response"
invoke-static {p1, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 51
new-instance p0, Lokhttp3/internal/http/StatusLine;
invoke-virtual {p1}, Lokhttp3/Response;->protocol()Lokhttp3/Protocol;
move-result-object v0
invoke-virtual {p1}, Lokhttp3/Response;->code()I
move-result v1
invoke-virtual {p1}, Lokhttp3/Response;->message()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, v0, v1, p1}, Lokhttp3/internal/http/StatusLine;-><init>(Lokhttp3/Protocol;ILjava/lang/String;)V
return-object p0
.end method
.method public final parse(Ljava/lang/String;)Lokhttp3/internal/http/StatusLine;
.locals 7
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const-string p0, "statusLine"
invoke-static {p1, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string p0, "HTTP/1."
const/4 v0, 0x0
const/4 v1, 0x2
const/4 v2, 0x0
.line 62
invoke-static {p1, p0, v0, v1, v2}, Lkotlin/text/StringsKt;->startsWith$default(Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Z
move-result p0
const/16 v3, 0x20
const/4 v4, 0x4
const-string v5, "Unexpected status line: "
if-eqz p0, :cond_3
.line 63
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result p0
const/16 v0, 0x9
if-lt p0, v0, :cond_2
const/16 p0, 0x8
invoke-virtual {p1, p0}, Ljava/lang/String;->charAt(I)C
move-result p0
if-ne p0, v3, :cond_2
const/4 p0, 0x7
.line 66
invoke-virtual {p1, p0}, Ljava/lang/String;->charAt(I)C
move-result p0
add-int/lit8 p0, p0, -0x30
if-nez p0, :cond_0
.line 69
sget-object p0, Lokhttp3/Protocol;->HTTP_1_0:Lokhttp3/Protocol;
goto :goto_0
:cond_0
const/4 v1, 0x1
if-ne p0, v1, :cond_1
.line 71
sget-object p0, Lokhttp3/Protocol;->HTTP_1_1:Lokhttp3/Protocol;
goto :goto_0
.line 73
:cond_1
new-instance p0, Ljava/net/ProtocolException;
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
.line 64
:cond_2
new-instance p0, Ljava/net/ProtocolException;
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
:cond_3
const-string p0, "ICY "
.line 75
invoke-static {p1, p0, v0, v1, v2}, Lkotlin/text/StringsKt;->startsWith$default(Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_7
.line 77
sget-object p0, Lokhttp3/Protocol;->HTTP_1_0:Lokhttp3/Protocol;
move v0, v4
.line 84
:goto_0
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v1
add-int/lit8 v2, v0, 0x3
if-lt v1, v2, :cond_6
.line 88
:try_start_0
invoke-virtual {p1, v0, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;
move-result-object v1
const-string v6, "(this as java.lang.Strin\u2026ing(startIndex, endIndex)"
invoke-static {v1, v6}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-static {v1}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v1
:try_end_0
.catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0
.line 96
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v6
if-le v6, v2, :cond_5
.line 97
invoke-virtual {p1, v2}, Ljava/lang/String;->charAt(I)C
move-result v2
if-ne v2, v3, :cond_4
add-int/2addr v0, v4
.line 100
invoke-virtual {p1, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;
move-result-object p1
const-string v0, "(this as java.lang.String).substring(startIndex)"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
goto :goto_1
.line 98
:cond_4
new-instance p0, Ljava/net/ProtocolException;
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
:cond_5
const-string p1, ""
.line 103
:goto_1
new-instance v0, Lokhttp3/internal/http/StatusLine;
invoke-direct {v0, p0, v1, p1}, Lokhttp3/internal/http/StatusLine;-><init>(Lokhttp3/Protocol;ILjava/lang/String;)V
return-object v0
.line 90
:catch_0
new-instance p0, Ljava/net/ProtocolException;
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
.line 85
:cond_6
new-instance p0, Ljava/net/ProtocolException;
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
.line 80
:cond_7
new-instance p0, Ljava/net/ProtocolException;
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
.end method