apkfuckery/com.discord/smali/com/adjust/sdk/aq.smali
2019-07-27 02:12:07 +02:00

286 lines
7.2 KiB
Smali

.class public final Lcom/adjust/sdk/aq;
.super Ljava/lang/Object;
.source "RequestHandler.java"
# interfaces
.implements Lcom/adjust/sdk/z;
# instance fields
.field private bP:Lcom/adjust/sdk/s;
.field private bS:Lcom/adjust/sdk/x;
.field private eT:Ljava/lang/ref/WeakReference;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/ref/WeakReference<",
"Lcom/adjust/sdk/y;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Lcom/adjust/sdk/y;)V
.locals 3
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
invoke-static {}, Lcom/adjust/sdk/j;->X()Lcom/adjust/sdk/x;
move-result-object v0
iput-object v0, p0, Lcom/adjust/sdk/aq;->bS:Lcom/adjust/sdk/x;
new-instance v0, Lcom/adjust/sdk/s;
const-string v1, "RequestHandler"
const/4 v2, 0x0
invoke-direct {v0, v1, v2}, Lcom/adjust/sdk/s;-><init>(Ljava/lang/String;Z)V
iput-object v0, p0, Lcom/adjust/sdk/aq;->bP:Lcom/adjust/sdk/s;
invoke-virtual {p0, p1}, Lcom/adjust/sdk/aq;->b(Lcom/adjust/sdk/y;)V
return-void
.end method
.method static synthetic a(Lcom/adjust/sdk/aq;Lcom/adjust/sdk/c;I)V
.locals 2
new-instance v0, Ljava/lang/StringBuilder;
const-string v1, "https://app.adjust.com"
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
iget-object v1, p1, Lcom/adjust/sdk/c;->path:Ljava/lang/String;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
:try_start_0
invoke-static {v0, p1, p2}, Lcom/adjust/sdk/ba;->a(Ljava/lang/String;Lcom/adjust/sdk/c;I)Lcom/adjust/sdk/ar;
move-result-object p2
iget-object v0, p0, Lcom/adjust/sdk/aq;->eT:Ljava/lang/ref/WeakReference;
invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/adjust/sdk/y;
if-nez v0, :cond_0
return-void
:cond_0
iget-object v1, p2, Lcom/adjust/sdk/ar;->di:Lorg/json/JSONObject;
if-nez v1, :cond_1
invoke-interface {v0, p2, p1}, Lcom/adjust/sdk/y;->a(Lcom/adjust/sdk/ar;Lcom/adjust/sdk/c;)V
return-void
:cond_1
invoke-interface {v0, p2}, Lcom/adjust/sdk/y;->b(Lcom/adjust/sdk/ar;)V
:try_end_0
.catch Ljava/io/UnsupportedEncodingException; {:try_start_0 .. :try_end_0} :catch_3
.catch Ljava/net/SocketTimeoutException; {:try_start_0 .. :try_end_0} :catch_2
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p2
const-string v0, "Runtime exception"
invoke-direct {p0, p1, v0, p2}, Lcom/adjust/sdk/aq;->b(Lcom/adjust/sdk/c;Ljava/lang/String;Ljava/lang/Throwable;)V
return-void
:catch_1
move-exception p2
const-string v0, "Request failed"
invoke-direct {p0, p1, v0, p2}, Lcom/adjust/sdk/aq;->a(Lcom/adjust/sdk/c;Ljava/lang/String;Ljava/lang/Throwable;)V
return-void
:catch_2
move-exception p2
const-string v0, "Request timed out"
invoke-direct {p0, p1, v0, p2}, Lcom/adjust/sdk/aq;->a(Lcom/adjust/sdk/c;Ljava/lang/String;Ljava/lang/Throwable;)V
return-void
:catch_3
move-exception p2
const-string v0, "Failed to encode parameters"
invoke-direct {p0, p1, v0, p2}, Lcom/adjust/sdk/aq;->b(Lcom/adjust/sdk/c;Ljava/lang/String;Ljava/lang/Throwable;)V
return-void
.end method
.method private a(Lcom/adjust/sdk/c;Ljava/lang/String;Ljava/lang/Throwable;)V
.locals 2
invoke-virtual {p1}, Lcom/adjust/sdk/c;->V()Ljava/lang/String;
move-result-object v0
invoke-static {p2, p3}, Lcom/adjust/sdk/az;->a(Ljava/lang/String;Ljava/lang/Throwable;)Ljava/lang/String;
move-result-object p2
const/4 p3, 0x2
new-array p3, p3, [Ljava/lang/Object;
const/4 v1, 0x0
aput-object v0, p3, v1
const/4 v0, 0x1
aput-object p2, p3, v0
const-string p2, "%s. (%s) Will retry later"
invoke-static {p2, p3}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p2
iget-object p3, p0, Lcom/adjust/sdk/aq;->bS:Lcom/adjust/sdk/x;
new-array v0, v1, [Ljava/lang/Object;
invoke-interface {p3, p2, v0}, Lcom/adjust/sdk/x;->f(Ljava/lang/String;[Ljava/lang/Object;)V
invoke-static {p1}, Lcom/adjust/sdk/ar;->c(Lcom/adjust/sdk/c;)Lcom/adjust/sdk/ar;
move-result-object p3
iput-object p2, p3, Lcom/adjust/sdk/ar;->message:Ljava/lang/String;
iget-object p2, p0, Lcom/adjust/sdk/aq;->eT:Ljava/lang/ref/WeakReference;
invoke-virtual {p2}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
move-result-object p2
check-cast p2, Lcom/adjust/sdk/y;
if-nez p2, :cond_0
return-void
:cond_0
invoke-interface {p2, p3, p1}, Lcom/adjust/sdk/y;->a(Lcom/adjust/sdk/ar;Lcom/adjust/sdk/c;)V
return-void
.end method
.method private b(Lcom/adjust/sdk/c;Ljava/lang/String;Ljava/lang/Throwable;)V
.locals 2
invoke-virtual {p1}, Lcom/adjust/sdk/c;->V()Ljava/lang/String;
move-result-object v0
invoke-static {p2, p3}, Lcom/adjust/sdk/az;->a(Ljava/lang/String;Ljava/lang/Throwable;)Ljava/lang/String;
move-result-object p2
const/4 p3, 0x2
new-array p3, p3, [Ljava/lang/Object;
const/4 v1, 0x0
aput-object v0, p3, v1
const/4 v0, 0x1
aput-object p2, p3, v0
const-string p2, "%s. (%s)"
invoke-static {p2, p3}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p2
iget-object p3, p0, Lcom/adjust/sdk/aq;->bS:Lcom/adjust/sdk/x;
new-array v0, v1, [Ljava/lang/Object;
invoke-interface {p3, p2, v0}, Lcom/adjust/sdk/x;->f(Ljava/lang/String;[Ljava/lang/Object;)V
invoke-static {p1}, Lcom/adjust/sdk/ar;->c(Lcom/adjust/sdk/c;)Lcom/adjust/sdk/ar;
move-result-object p1
iput-object p2, p1, Lcom/adjust/sdk/ar;->message:Ljava/lang/String;
iget-object p2, p0, Lcom/adjust/sdk/aq;->eT:Ljava/lang/ref/WeakReference;
invoke-virtual {p2}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
move-result-object p2
check-cast p2, Lcom/adjust/sdk/y;
if-nez p2, :cond_0
return-void
:cond_0
invoke-interface {p2, p1}, Lcom/adjust/sdk/y;->b(Lcom/adjust/sdk/ar;)V
return-void
.end method
# virtual methods
.method public final a(Lcom/adjust/sdk/c;I)V
.locals 2
iget-object v0, p0, Lcom/adjust/sdk/aq;->bP:Lcom/adjust/sdk/s;
new-instance v1, Lcom/adjust/sdk/aq$1;
invoke-direct {v1, p0, p1, p2}, Lcom/adjust/sdk/aq$1;-><init>(Lcom/adjust/sdk/aq;Lcom/adjust/sdk/c;I)V
invoke-virtual {v0, v1}, Lcom/adjust/sdk/s;->submit(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
return-void
.end method
.method public final b(Lcom/adjust/sdk/y;)V
.locals 1
new-instance v0, Ljava/lang/ref/WeakReference;
invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
iput-object v0, p0, Lcom/adjust/sdk/aq;->eT:Ljava/lang/ref/WeakReference;
return-void
.end method