apkfuckery/com.discord/smali_classes2/okhttp3/Headers$a.smali

588 lines
11 KiB
Smali
Raw Normal View History

2020-05-17 12:40:10 +00:00
.class public final Lokhttp3/Headers$a;
.super Ljava/lang/Object;
.source "Headers.kt"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/Headers;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "a"
.end annotation
# instance fields
.field public final a:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Ljava/lang/String;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>()V
.locals 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
new-instance v0, Ljava/util/ArrayList;
const/16 v1, 0x14
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V
iput-object v0, p0, Lokhttp3/Headers$a;->a:Ljava/util/List;
return-void
.end method
# virtual methods
2020-07-08 16:44:49 +00:00
.method public final a(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$a;
.locals 9
2020-05-17 12:40:10 +00:00
const/4 v0, 0x0
2020-07-08 16:44:49 +00:00
if-eqz p1, :cond_c
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-eqz p2, :cond_b
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual {p1}, Ljava/lang/String;->length()I
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
move-result v0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
const/4 v1, 0x1
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
const/4 v2, 0x0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-lez v0, :cond_0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
const/4 v0, 0x1
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
goto :goto_0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:cond_0
const/4 v0, 0x0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:goto_0
if-eqz v0, :cond_a
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual {p1}, Ljava/lang/String;->length()I
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
move-result v0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
const/4 v3, 0x0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:goto_1
const/4 v4, 0x2
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
const/4 v5, 0x3
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
const/16 v6, 0x7e
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-ge v3, v0, :cond_4
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual {p1, v3}, Ljava/lang/String;->charAt(I)C
move-result v7
const/16 v8, 0x21
if-le v8, v7, :cond_1
goto :goto_2
2020-05-17 12:40:10 +00:00
:cond_1
2020-07-08 16:44:49 +00:00
if-lt v6, v7, :cond_2
const/4 v6, 0x1
goto :goto_3
2020-05-17 12:40:10 +00:00
:cond_2
2020-07-08 16:44:49 +00:00
:goto_2
const/4 v6, 0x0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:goto_3
if-eqz v6, :cond_3
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
add-int/lit8 v3, v3, 0x1
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
goto :goto_1
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:cond_3
new-array p2, v5, [Ljava/lang/Object;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-static {v7}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
move-result-object v0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
aput-object v0, p2, v2
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v0
aput-object v0, p2, v1
aput-object p1, p2, v4
const-string p1, "Unexpected char %#04x at %d in header name: %s"
2020-07-14 22:43:59 +00:00
invoke-static {p1, p2}, Lm0/g0/b;->l(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
2020-07-08 16:44:49 +00:00
move-result-object p1
new-instance p2, Ljava/lang/IllegalArgumentException;
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p2
:cond_4
invoke-virtual {p2}, Ljava/lang/String;->length()I
move-result v0
const/4 v3, 0x0
:goto_4
if-ge v3, v0, :cond_9
invoke-virtual {p2, v3}, Ljava/lang/String;->charAt(I)C
move-result v7
const/16 v8, 0x9
if-eq v7, v8, :cond_7
const/16 v8, 0x20
if-le v8, v7, :cond_5
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
goto :goto_5
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:cond_5
if-lt v6, v7, :cond_6
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
goto :goto_6
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:cond_6
:goto_5
const/4 v8, 0x0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
goto :goto_7
:cond_7
:goto_6
const/4 v8, 0x1
:goto_7
if-eqz v8, :cond_8
add-int/lit8 v3, v3, 0x1
goto :goto_4
:cond_8
const/4 v0, 0x4
new-array v0, v0, [Ljava/lang/Object;
invoke-static {v7}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v6
aput-object v6, v0, v2
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
aput-object p1, v0, v4
aput-object p2, v0, v5
const-string p1, "Unexpected char %#04x at %d in %s value: %s"
2020-07-14 22:43:59 +00:00
invoke-static {p1, v0}, Lm0/g0/b;->l(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
2020-07-08 16:44:49 +00:00
move-result-object p1
new-instance p2, Ljava/lang/IllegalArgumentException;
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p2
:cond_9
2020-05-17 12:40:10 +00:00
invoke-virtual {p0, p1, p2}, Lokhttp3/Headers$a;->b(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$a;
return-object p0
2020-07-08 16:44:49 +00:00
:cond_a
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "name is empty"
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
:cond_b
2020-05-17 12:40:10 +00:00
const-string p1, "value"
2020-07-14 22:43:59 +00:00
invoke-static {p1}, Li0/n/c/h;->c(Ljava/lang/String;)V
2020-05-17 12:40:10 +00:00
throw v0
2020-07-08 16:44:49 +00:00
:cond_c
2020-05-17 12:40:10 +00:00
const-string p1, "name"
2020-07-14 22:43:59 +00:00
invoke-static {p1}, Li0/n/c/h;->c(Ljava/lang/String;)V
2020-05-17 12:40:10 +00:00
throw v0
.end method
2020-07-08 16:44:49 +00:00
.method public final b(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$a;
.locals 1
if-eqz p2, :cond_0
iget-object v0, p0, Lokhttp3/Headers$a;->a:Ljava/util/List;
invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
iget-object p1, p0, Lokhttp3/Headers$a;->a:Ljava/util/List;
2020-07-14 22:43:59 +00:00
invoke-static {p2}, Li0/t/p;->trim(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
2020-07-08 16:44:49 +00:00
move-result-object p2
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p2
invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
return-object p0
:cond_0
const-string p1, "value"
2020-07-14 22:43:59 +00:00
invoke-static {p1}, Li0/n/c/h;->c(Ljava/lang/String;)V
2020-07-08 16:44:49 +00:00
const/4 p1, 0x0
throw p1
.end method
.method public final c()Lokhttp3/Headers;
2020-05-17 12:40:10 +00:00
.locals 3
iget-object v0, p0, Lokhttp3/Headers$a;->a:Ljava/util/List;
const/4 v1, 0x0
new-array v1, v1, [Ljava/lang/String;
invoke-interface {v0, v1}, Ljava/util/Collection;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
move-result-object v0
if-eqz v0, :cond_0
check-cast v0, [Ljava/lang/String;
const/4 v1, 0x0
new-instance v2, Lokhttp3/Headers;
invoke-direct {v2, v0, v1}, Lokhttp3/Headers;-><init>([Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
return-object v2
:cond_0
2020-07-08 16:44:49 +00:00
new-instance v0, Lkotlin/TypeCastException;
2020-05-17 12:40:10 +00:00
const-string v1, "null cannot be cast to non-null type kotlin.Array<T>"
2020-07-08 16:44:49 +00:00
invoke-direct {v0, v1}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
2020-05-17 12:40:10 +00:00
throw v0
.end method
2020-07-08 16:44:49 +00:00
.method public final d(Ljava/lang/String;)Lokhttp3/Headers$a;
.locals 3
2020-05-17 12:40:10 +00:00
const/4 v0, 0x0
2020-07-08 16:44:49 +00:00
:goto_0
iget-object v1, p0, Lokhttp3/Headers$a;->a:Ljava/util/List;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-interface {v1}, Ljava/util/List;->size()I
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
move-result v1
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-ge v0, v1, :cond_1
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v1, p0, Lokhttp3/Headers$a;->a:Ljava/util/List;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-interface {v1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
move-result-object v1
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
check-cast v1, Ljava/lang/String;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
const/4 v2, 0x1
2020-05-17 12:40:10 +00:00
2020-07-14 22:43:59 +00:00
invoke-static {p1, v1, v2}, Li0/t/k;->equals(Ljava/lang/String;Ljava/lang/String;Z)Z
2020-07-08 16:44:49 +00:00
move-result v1
if-eqz v1, :cond_0
iget-object v1, p0, Lokhttp3/Headers$a;->a:Ljava/util/List;
invoke-interface {v1, v0}, Ljava/util/List;->remove(I)Ljava/lang/Object;
iget-object v1, p0, Lokhttp3/Headers$a;->a:Ljava/util/List;
invoke-interface {v1, v0}, Ljava/util/List;->remove(I)Ljava/lang/Object;
add-int/lit8 v0, v0, -0x2
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:cond_0
add-int/lit8 v0, v0, 0x2
goto :goto_0
:cond_1
2020-05-17 12:40:10 +00:00
return-object p0
2020-07-08 16:44:49 +00:00
.end method
.method public final e(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$a;
.locals 9
invoke-interface {p1}, Ljava/lang/CharSequence;->length()I
move-result v0
const/4 v1, 0x1
const/4 v2, 0x0
if-lez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
2020-05-17 12:40:10 +00:00
:cond_0
2020-07-08 16:44:49 +00:00
const/4 v0, 0x0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:goto_0
if-eqz v0, :cond_a
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v0
const/4 v3, 0x0
:goto_1
const/4 v4, 0x2
const/4 v5, 0x3
const/16 v6, 0x7e
if-ge v3, v0, :cond_4
invoke-virtual {p1, v3}, Ljava/lang/String;->charAt(I)C
move-result v7
const/16 v8, 0x21
if-le v8, v7, :cond_1
goto :goto_2
2020-05-17 12:40:10 +00:00
:cond_1
2020-07-08 16:44:49 +00:00
if-lt v6, v7, :cond_2
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
const/4 v6, 0x1
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
goto :goto_3
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:cond_2
:goto_2
const/4 v6, 0x0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:goto_3
if-eqz v6, :cond_3
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
add-int/lit8 v3, v3, 0x1
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
goto :goto_1
:cond_3
new-array p2, v5, [Ljava/lang/Object;
invoke-static {v7}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v0
aput-object v0, p2, v2
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v0
aput-object v0, p2, v1
aput-object p1, p2, v4
const-string p1, "Unexpected char %#04x at %d in header name: %s"
2020-07-14 22:43:59 +00:00
invoke-static {p1, p2}, Lm0/g0/b;->l(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
2020-07-08 16:44:49 +00:00
move-result-object p1
new-instance p2, Ljava/lang/IllegalArgumentException;
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p2
:cond_4
invoke-virtual {p2}, Ljava/lang/String;->length()I
move-result v0
const/4 v3, 0x0
:goto_4
if-ge v3, v0, :cond_9
invoke-virtual {p2, v3}, Ljava/lang/String;->charAt(I)C
move-result v7
const/16 v8, 0x9
if-eq v7, v8, :cond_7
const/16 v8, 0x20
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-le v8, v7, :cond_5
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
goto :goto_5
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:cond_5
if-lt v6, v7, :cond_6
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
goto :goto_6
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:cond_6
:goto_5
const/4 v8, 0x0
goto :goto_7
:cond_7
:goto_6
const/4 v8, 0x1
:goto_7
if-eqz v8, :cond_8
add-int/lit8 v3, v3, 0x1
goto :goto_4
:cond_8
const/4 v0, 0x4
new-array v0, v0, [Ljava/lang/Object;
invoke-static {v7}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v6
aput-object v6, v0, v2
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
aput-object p1, v0, v4
aput-object p2, v0, v5
const-string p1, "Unexpected char %#04x at %d in %s value: %s"
2020-07-14 22:43:59 +00:00
invoke-static {p1, v0}, Lm0/g0/b;->l(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
2020-07-08 16:44:49 +00:00
move-result-object p1
new-instance p2, Ljava/lang/IllegalArgumentException;
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p2
:cond_9
invoke-virtual {p0, p1}, Lokhttp3/Headers$a;->d(Ljava/lang/String;)Lokhttp3/Headers$a;
2020-05-17 12:40:10 +00:00
invoke-virtual {p0, p1, p2}, Lokhttp3/Headers$a;->b(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$a;
return-object p0
2020-07-08 16:44:49 +00:00
:cond_a
new-instance p1, Ljava/lang/IllegalArgumentException;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
const-string p2, "name is empty"
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
move-result-object p2
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
throw p1
2020-05-17 12:40:10 +00:00
.end method