124 lines
3 KiB
Smali
124 lines
3 KiB
Smali
.class public final Lcom/discord/restapi/BreadcrumbInterceptor;
|
|
.super Ljava/lang/Object;
|
|
.source "RestInterceptors.kt"
|
|
|
|
# interfaces
|
|
.implements Lokhttp3/Interceptor;
|
|
|
|
|
|
# instance fields
|
|
.field public final logger:Lcom/discord/utilities/logging/Logger;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/utilities/logging/Logger;)V
|
|
.locals 0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/restapi/BreadcrumbInterceptor;->logger:Lcom/discord/utilities/logging/Logger;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "logger"
|
|
|
|
invoke-static {p1}, Ls/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public intercept(Lokhttp3/Interceptor$Chain;)Lokhttp3/Response;
|
|
.locals 8
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-interface {p1}, Lokhttp3/Interceptor$Chain;->e()Lv/y;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, v0, Lv/y;->c:Ljava/lang/String;
|
|
|
|
iget-object v0, v0, Lv/y;->b:Lv/u;
|
|
|
|
iget-object v2, p0, Lcom/discord/restapi/BreadcrumbInterceptor;->logger:Lcom/discord/utilities/logging/Logger;
|
|
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v4, "HTTP["
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v4, "] - "
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
const/4 v4, 0x2
|
|
|
|
new-array v4, v4, [Lkotlin/Pair;
|
|
|
|
const/4 v5, 0x0
|
|
|
|
iget-object v0, v0, Lv/u;->j:Ljava/lang/String;
|
|
|
|
new-instance v6, Lkotlin/Pair;
|
|
|
|
const-string v7, "url"
|
|
|
|
invoke-direct {v6, v7, v0}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
aput-object v6, v4, v5
|
|
|
|
const/4 v0, 0x1
|
|
|
|
new-instance v5, Lkotlin/Pair;
|
|
|
|
const-string v6, "method"
|
|
|
|
invoke-direct {v5, v6, v1}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
aput-object v5, v4, v0
|
|
|
|
invoke-static {v4}, Ls/q/l;->mapOf([Lkotlin/Pair;)Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "http"
|
|
|
|
invoke-virtual {v2, v3, v1, v0}, Lcom/discord/utilities/logging/Logger;->recordBreadcrumb(Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;)V
|
|
|
|
invoke-interface {p1}, Lokhttp3/Interceptor$Chain;->e()Lv/y;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p1, v0}, Lokhttp3/Interceptor$Chain;->a(Lv/y;)Lokhttp3/Response;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
const-string p1, "chain"
|
|
|
|
invoke-static {p1}, Ls/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|