apkfuckery/com.discord/smali_classes2/okhttp3/MultipartBody$Part$a.smali

245 lines
5.4 KiB
Smali
Raw Normal View History

2019-11-28 00:30:53 +00:00
.class public final Lokhttp3/MultipartBody$Part$a;
.super Ljava/lang/Object;
.source "MultipartBody.kt"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/MultipartBody$Part;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "a"
.end annotation
# direct methods
2019-12-06 03:29:40 +00:00
.method public synthetic constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
2019-11-28 00:30:53 +00:00
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
2019-12-06 03:29:40 +00:00
# virtual methods
.method public final a(Ljava/lang/String;Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/MultipartBody$Part;
.locals 3
2019-11-28 00:30:53 +00:00
2019-12-06 03:29:40 +00:00
const/4 v0, 0x0
2019-11-28 00:30:53 +00:00
2019-12-06 03:29:40 +00:00
if-eqz p1, :cond_4
if-eqz p3, :cond_3
const-string v1, "form-data; name="
invoke-static {v1}, Le/e/b/a/a;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
sget-object v2, Lokhttp3/MultipartBody;->k:Lokhttp3/MultipartBody$b;
invoke-virtual {v2, v1, p1}, Lokhttp3/MultipartBody$b;->a(Ljava/lang/StringBuilder;Ljava/lang/String;)V
if-eqz p2, :cond_0
const-string p1, "; filename="
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
sget-object p1, Lokhttp3/MultipartBody;->k:Lokhttp3/MultipartBody$b;
invoke-virtual {p1, v1, p2}, Lokhttp3/MultipartBody$b;->a(Ljava/lang/StringBuilder;Ljava/lang/String;)V
:cond_0
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
const-string p2, "StringBuilder().apply(builderAction).toString()"
2020-03-27 22:23:51 +00:00
invoke-static {p1, p2}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2019-12-06 03:29:40 +00:00
new-instance p2, Ljava/util/ArrayList;
const/16 v1, 0x14
invoke-direct {p2, v1}, Ljava/util/ArrayList;-><init>(I)V
const-string v1, "Content-Disposition"
sget-object v2, Lokhttp3/Headers;->e:Lokhttp3/Headers$b;
invoke-virtual {v2, v1}, Lokhttp3/Headers$b;->a(Ljava/lang/String;)V
if-eqz p1, :cond_2
invoke-interface {p2, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
2020-03-27 22:23:51 +00:00
invoke-static {p1}, Ly/a0/u;->trim(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
2019-12-06 03:29:40 +00:00
move-result-object p1
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-interface {p2, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
const/4 p1, 0x0
new-array p1, p1, [Ljava/lang/String;
invoke-interface {p2, p1}, Ljava/util/Collection;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
move-result-object p1
if-eqz p1, :cond_1
check-cast p1, [Ljava/lang/String;
new-instance p2, Lokhttp3/Headers;
invoke-direct {p2, p1, v0}, Lokhttp3/Headers;-><init>([Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
invoke-virtual {p0, p2, p3}, Lokhttp3/MultipartBody$Part$a;->a(Lokhttp3/Headers;Lokhttp3/RequestBody;)Lokhttp3/MultipartBody$Part;
move-result-object p1
return-object p1
:cond_1
2020-03-27 22:23:51 +00:00
new-instance p1, Ly/l;
2019-11-28 00:30:53 +00:00
2019-12-06 03:29:40 +00:00
const-string p2, "null cannot be cast to non-null type kotlin.Array<T>"
2019-11-28 00:30:53 +00:00
2020-03-27 22:23:51 +00:00
invoke-direct {p1, p2}, Ly/l;-><init>(Ljava/lang/String;)V
2019-12-06 03:29:40 +00:00
throw p1
:cond_2
const-string p1, "value"
2020-03-27 22:23:51 +00:00
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
2019-12-06 03:29:40 +00:00
throw v0
:cond_3
const-string p1, "body"
2020-03-27 22:23:51 +00:00
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
2019-12-06 03:29:40 +00:00
throw v0
:cond_4
const-string p1, "name"
2020-03-27 22:23:51 +00:00
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
2019-12-06 03:29:40 +00:00
throw v0
.end method
.method public final a(Lokhttp3/Headers;Lokhttp3/RequestBody;)Lokhttp3/MultipartBody$Part;
.locals 4
2019-11-28 00:30:53 +00:00
const/4 v0, 0x0
2019-12-06 03:29:40 +00:00
if-eqz p2, :cond_6
if-eqz p1, :cond_0
2019-11-28 00:30:53 +00:00
const-string v1, "Content-Type"
2019-12-06 03:29:40 +00:00
invoke-virtual {p1, v1}, Lokhttp3/Headers;->a(Ljava/lang/String;)Ljava/lang/String;
2019-11-28 00:30:53 +00:00
move-result-object v1
goto :goto_0
:cond_0
move-object v1, v0
:goto_0
const/4 v2, 0x1
const/4 v3, 0x0
if-nez v1, :cond_1
const/4 v1, 0x1
goto :goto_1
:cond_1
const/4 v1, 0x0
:goto_1
if-eqz v1, :cond_5
2019-12-06 03:29:40 +00:00
if-eqz p1, :cond_2
2019-11-28 00:30:53 +00:00
2019-12-06 03:29:40 +00:00
const-string v1, "Content-Length"
2019-11-28 00:30:53 +00:00
2019-12-06 03:29:40 +00:00
invoke-virtual {p1, v1}, Lokhttp3/Headers;->a(Ljava/lang/String;)Ljava/lang/String;
2019-11-28 00:30:53 +00:00
2019-12-06 03:29:40 +00:00
move-result-object v1
goto :goto_2
2019-11-28 00:30:53 +00:00
:cond_2
2019-12-06 03:29:40 +00:00
move-object v1, v0
2019-11-28 00:30:53 +00:00
2019-12-06 03:29:40 +00:00
:goto_2
if-nez v1, :cond_3
goto :goto_3
2019-11-28 00:30:53 +00:00
:cond_3
const/4 v2, 0x0
2019-12-06 03:29:40 +00:00
:goto_3
2019-11-28 00:30:53 +00:00
if-eqz v2, :cond_4
2019-12-06 03:29:40 +00:00
new-instance v1, Lokhttp3/MultipartBody$Part;
2019-11-28 00:30:53 +00:00
2019-12-06 03:29:40 +00:00
invoke-direct {v1, p1, p2, v0}, Lokhttp3/MultipartBody$Part;-><init>(Lokhttp3/Headers;Lokhttp3/RequestBody;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
2019-11-28 00:30:53 +00:00
2019-12-06 03:29:40 +00:00
return-object v1
2019-11-28 00:30:53 +00:00
:cond_4
2019-12-06 03:29:40 +00:00
new-instance p1, Ljava/lang/IllegalArgumentException;
2019-11-28 00:30:53 +00:00
2019-12-06 03:29:40 +00:00
const-string p2, "Unexpected header: Content-Length"
2019-11-28 00:30:53 +00:00
2019-12-06 03:29:40 +00:00
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
2019-11-28 00:30:53 +00:00
2019-12-06 03:29:40 +00:00
move-result-object p2
2019-11-28 00:30:53 +00:00
2019-12-06 03:29:40 +00:00
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
2019-11-28 00:30:53 +00:00
2019-12-06 03:29:40 +00:00
throw p1
2019-11-28 00:30:53 +00:00
:cond_5
2019-12-06 03:29:40 +00:00
new-instance p1, Ljava/lang/IllegalArgumentException;
2019-11-28 00:30:53 +00:00
2019-12-06 03:29:40 +00:00
const-string p2, "Unexpected header: Content-Type"
2019-11-28 00:30:53 +00:00
2019-12-06 03:29:40 +00:00
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
2019-11-28 00:30:53 +00:00
2019-12-06 03:29:40 +00:00
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
2019-11-28 00:30:53 +00:00
2019-12-06 03:29:40 +00:00
:cond_6
const-string p1, "body"
2019-11-28 00:30:53 +00:00
2020-03-27 22:23:51 +00:00
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
2019-11-28 00:30:53 +00:00
2019-12-06 03:29:40 +00:00
throw v0
2019-11-28 00:30:53 +00:00
.end method