apkfuckery/com.discord/smali_classes2/q0/t/a/c.smali

133 lines
3.0 KiB
Smali

.class public final Lq0/t/a/c;
.super Ljava/lang/Object;
.source "GsonResponseBodyConverter.java"
# interfaces
.implements Lq0/e;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;",
"Lq0/e<",
"Lokhttp3/ResponseBody;",
"TT;>;"
}
.end annotation
# instance fields
.field public final a:Lcom/google/gson/Gson;
.field public final b:Lcom/google/gson/TypeAdapter;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/google/gson/TypeAdapter<",
"TT;>;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Lcom/google/gson/Gson;Lcom/google/gson/TypeAdapter;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/gson/Gson;",
"Lcom/google/gson/TypeAdapter<",
"TT;>;)V"
}
.end annotation
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lq0/t/a/c;->a:Lcom/google/gson/Gson;
iput-object p2, p0, Lq0/t/a/c;->b:Lcom/google/gson/TypeAdapter;
return-void
.end method
# virtual methods
.method public a(Ljava/lang/Object;)Ljava/lang/Object;
.locals 5
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
check-cast p1, Lokhttp3/ResponseBody;
iget-object v0, p0, Lq0/t/a/c;->a:Lcom/google/gson/Gson;
iget-object v1, p1, Lokhttp3/ResponseBody;->d:Ljava/io/Reader;
if-eqz v1, :cond_0
goto :goto_1
:cond_0
new-instance v1, Lokhttp3/ResponseBody$a;
invoke-virtual {p1}, Lokhttp3/ResponseBody;->c()Lo0/g;
move-result-object v2
invoke-virtual {p1}, Lokhttp3/ResponseBody;->b()Lokhttp3/MediaType;
move-result-object v3
if-eqz v3, :cond_1
sget-object v4, Lj0/t/a;->a:Ljava/nio/charset/Charset;
invoke-virtual {v3, v4}, Lokhttp3/MediaType;->a(Ljava/nio/charset/Charset;)Ljava/nio/charset/Charset;
move-result-object v3
if-eqz v3, :cond_1
goto :goto_0
:cond_1
sget-object v3, Lj0/t/a;->a:Ljava/nio/charset/Charset;
:goto_0
invoke-direct {v1, v2, v3}, Lokhttp3/ResponseBody$a;-><init>(Lo0/g;Ljava/nio/charset/Charset;)V
iput-object v1, p1, Lokhttp3/ResponseBody;->d:Ljava/io/Reader;
:goto_1
invoke-virtual {v0, v1}, Lcom/google/gson/Gson;->i(Ljava/io/Reader;)Lcom/google/gson/stream/JsonReader;
move-result-object v0
:try_start_0
iget-object v1, p0, Lq0/t/a/c;->b:Lcom/google/gson/TypeAdapter;
invoke-virtual {v1, v0}, Lcom/google/gson/TypeAdapter;->read(Lcom/google/gson/stream/JsonReader;)Ljava/lang/Object;
move-result-object v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
invoke-virtual {p1}, Lokhttp3/ResponseBody;->close()V
return-object v0
:catchall_0
move-exception v0
invoke-virtual {p1}, Lokhttp3/ResponseBody;->close()V
throw v0
.end method