apkfuckery/com.discord/smali/com/adjust/sdk/as.smali

458 lines
11 KiB
Smali
Raw Normal View History

2019-02-04 20:08:30 +00:00
.class public final Lcom/adjust/sdk/as;
2019-02-17 02:24:41 +00:00
.super Ljava/lang/Object;
.source "SdkClickHandler.java"
# interfaces
.implements Lcom/adjust/sdk/ab;
2019-02-04 20:08:30 +00:00
# instance fields
2019-05-03 18:53:54 +00:00
.field bN:Lcom/adjust/sdk/s;
2019-02-17 02:24:41 +00:00
2019-05-03 18:53:54 +00:00
.field bQ:Lcom/adjust/sdk/x;
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
.field dt:Ljava/lang/ref/WeakReference;
2019-02-17 02:24:41 +00:00
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/ref/WeakReference<",
"Lcom/adjust/sdk/v;",
">;"
}
.end annotation
.end field
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
.field dw:Z
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
.field eL:Ljava/util/List;
2019-02-17 02:24:41 +00:00
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Lcom/adjust/sdk/c;",
">;"
}
.end annotation
.end field
2019-05-03 18:53:54 +00:00
.field eN:Lcom/adjust/sdk/q;
2019-02-04 20:08:30 +00:00
# direct methods
2019-02-17 02:24:41 +00:00
.method public constructor <init>(Lcom/adjust/sdk/v;Z)V
.locals 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
invoke-virtual {p0, p1, p2}, Lcom/adjust/sdk/as;->b(Lcom/adjust/sdk/v;Z)V
invoke-static {}, Lcom/adjust/sdk/j;->X()Lcom/adjust/sdk/x;
move-result-object p1
2019-05-03 18:53:54 +00:00
iput-object p1, p0, Lcom/adjust/sdk/as;->bQ:Lcom/adjust/sdk/x;
2019-02-17 02:24:41 +00:00
invoke-static {}, Lcom/adjust/sdk/j;->ac()Lcom/adjust/sdk/q;
move-result-object p1
2019-05-03 18:53:54 +00:00
iput-object p1, p0, Lcom/adjust/sdk/as;->eN:Lcom/adjust/sdk/q;
2019-02-17 02:24:41 +00:00
new-instance p1, Lcom/adjust/sdk/s;
const-string p2, "SdkClickHandler"
const/4 v0, 0x0
invoke-direct {p1, p2, v0}, Lcom/adjust/sdk/s;-><init>(Ljava/lang/String;Z)V
2019-05-03 18:53:54 +00:00
iput-object p1, p0, Lcom/adjust/sdk/as;->bN:Lcom/adjust/sdk/s;
2019-02-17 02:24:41 +00:00
return-void
.end method
.method static synthetic a(Lcom/adjust/sdk/as;Lcom/adjust/sdk/c;)V
.locals 13
2019-05-03 18:53:54 +00:00
iget-object v0, p0, Lcom/adjust/sdk/as;->dt:Ljava/lang/ref/WeakReference;
2019-02-17 02:24:41 +00:00
invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/adjust/sdk/v;
iget-object v1, p1, Lcom/adjust/sdk/c;->parameters:Ljava/util/Map;
const-string v2, "source"
invoke-interface {v1, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/lang/String;
const/4 v2, 0x0
const/4 v3, 0x1
if-eqz v1, :cond_0
const-string v4, "reftag"
invoke-virtual {v1, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_0
const/4 v4, 0x1
goto :goto_0
:cond_0
const/4 v4, 0x0
:goto_0
iget-object v5, p1, Lcom/adjust/sdk/c;->parameters:Ljava/util/Map;
const-string v6, "raw_referrer"
invoke-interface {v5, v6}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v5
check-cast v5, Ljava/lang/String;
if-eqz v4, :cond_1
new-instance v6, Lcom/adjust/sdk/aw;
invoke-interface {v0}, Lcom/adjust/sdk/v;->getContext()Landroid/content/Context;
move-result-object v7
invoke-direct {v6, v7}, Lcom/adjust/sdk/aw;-><init>(Landroid/content/Context;)V
iget-wide v7, p1, Lcom/adjust/sdk/c;->clickTimeInMilliseconds:J
invoke-virtual {v6, v5, v7, v8}, Lcom/adjust/sdk/aw;->c(Ljava/lang/String;J)Lorg/json/JSONArray;
move-result-object v6
if-eqz v6, :cond_8
:cond_1
if-eqz v1, :cond_2
const-string v6, "install_referrer"
invoke-virtual {v1, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_2
const/4 v2, 0x1
:cond_2
const/4 v1, 0x0
const-wide/16 v6, 0x0
if-eqz v2, :cond_3
iget-wide v6, p1, Lcom/adjust/sdk/c;->clickTimeInSeconds:J
iget-wide v8, p1, Lcom/adjust/sdk/c;->installBeginTimeInSeconds:J
iget-object v1, p1, Lcom/adjust/sdk/c;->parameters:Ljava/util/Map;
const-string v10, "referrer"
invoke-interface {v1, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/lang/String;
goto :goto_1
:cond_3
move-wide v8, v6
:goto_1
new-instance v10, Ljava/lang/StringBuilder;
const-string v11, "https://app.adjust.com"
invoke-direct {v10, v11}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
iget-object v11, p1, Lcom/adjust/sdk/c;->path:Ljava/lang/String;
invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v10
:try_start_0
2019-05-03 18:53:54 +00:00
iget-object v11, p0, Lcom/adjust/sdk/as;->eL:Ljava/util/List;
2019-02-17 02:24:41 +00:00
invoke-interface {v11}, Ljava/util/List;->size()I
move-result v11
sub-int/2addr v11, v3
invoke-static {v10, p1, v11}, Lcom/adjust/sdk/ba;->a(Ljava/lang/String;Lcom/adjust/sdk/c;I)Lcom/adjust/sdk/ar;
move-result-object v10
check-cast v10, Lcom/adjust/sdk/at;
2019-05-03 18:53:54 +00:00
iget-object v11, v10, Lcom/adjust/sdk/at;->dg:Lorg/json/JSONObject;
2019-02-17 02:24:41 +00:00
if-nez v11, :cond_4
invoke-direct {p0, p1}, Lcom/adjust/sdk/as;->d(Lcom/adjust/sdk/c;)V
return-void
:cond_4
if-nez v0, :cond_5
return-void
:cond_5
if-eqz v4, :cond_6
new-instance v4, Lcom/adjust/sdk/aw;
invoke-interface {v0}, Lcom/adjust/sdk/v;->getContext()Landroid/content/Context;
move-result-object v11
invoke-direct {v4, v11}, Lcom/adjust/sdk/aw;-><init>(Landroid/content/Context;)V
iget-wide v11, p1, Lcom/adjust/sdk/c;->clickTimeInMilliseconds:J
invoke-virtual {v4, v5, v11, v12}, Lcom/adjust/sdk/aw;->b(Ljava/lang/String;J)V
:cond_6
if-eqz v2, :cond_7
iput-wide v6, v10, Lcom/adjust/sdk/at;->clickTime:J
iput-wide v8, v10, Lcom/adjust/sdk/at;->installBegin:J
iput-object v1, v10, Lcom/adjust/sdk/at;->installReferrer:Ljava/lang/String;
2019-05-03 18:53:54 +00:00
iput-boolean v3, v10, Lcom/adjust/sdk/at;->eY:Z
2019-02-17 02:24:41 +00:00
:cond_7
invoke-interface {v0, v10}, Lcom/adjust/sdk/v;->a(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 v0
const-string v1, "Sdk_click runtime exception"
invoke-direct {p0, p1, v1, v0}, Lcom/adjust/sdk/as;->c(Lcom/adjust/sdk/c;Ljava/lang/String;Ljava/lang/Throwable;)V
:cond_8
return-void
:catch_1
move-exception v0
const-string v1, "Sdk_click request failed. Will retry later"
invoke-direct {p0, p1, v1, v0}, Lcom/adjust/sdk/as;->c(Lcom/adjust/sdk/c;Ljava/lang/String;Ljava/lang/Throwable;)V
invoke-direct {p0, p1}, Lcom/adjust/sdk/as;->d(Lcom/adjust/sdk/c;)V
return-void
:catch_2
move-exception v0
const-string v1, "Sdk_click request timed out. Will retry later"
invoke-direct {p0, p1, v1, v0}, Lcom/adjust/sdk/as;->c(Lcom/adjust/sdk/c;Ljava/lang/String;Ljava/lang/Throwable;)V
invoke-direct {p0, p1}, Lcom/adjust/sdk/as;->d(Lcom/adjust/sdk/c;)V
return-void
:catch_3
move-exception v0
const-string v1, "Sdk_click failed to encode parameters"
invoke-direct {p0, p1, v1, v0}, Lcom/adjust/sdk/as;->c(Lcom/adjust/sdk/c;Ljava/lang/String;Ljava/lang/Throwable;)V
return-void
.end method
.method private c(Lcom/adjust/sdk/c;Ljava/lang/String;Ljava/lang/Throwable;)V
2019-05-03 18:53:54 +00:00
.locals 1
2019-02-17 02:24:41 +00:00
invoke-virtual {p1}, Lcom/adjust/sdk/c;->V()Ljava/lang/String;
move-result-object p1
invoke-static {p2, p3}, Lcom/adjust/sdk/az;->a(Ljava/lang/String;Ljava/lang/Throwable;)Ljava/lang/String;
move-result-object p2
2019-05-03 18:53:54 +00:00
const/4 p3, 0x2
2019-02-17 02:24:41 +00:00
2019-05-03 18:53:54 +00:00
new-array p3, p3, [Ljava/lang/Object;
2019-02-17 02:24:41 +00:00
2019-05-03 18:53:54 +00:00
const/4 v0, 0x0
2019-02-17 02:24:41 +00:00
2019-05-03 18:53:54 +00:00
aput-object p1, p3, v0
2019-02-17 02:24:41 +00:00
const/4 p1, 0x1
2019-05-03 18:53:54 +00:00
aput-object p2, p3, p1
const-string p1, "%s. (%s)"
2019-02-17 02:24:41 +00:00
2019-05-03 18:53:54 +00:00
invoke-static {p1, p3}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
2019-02-17 02:24:41 +00:00
move-result-object p1
2019-05-03 18:53:54 +00:00
iget-object p2, p0, Lcom/adjust/sdk/as;->bQ:Lcom/adjust/sdk/x;
2019-02-17 02:24:41 +00:00
2019-05-03 18:53:54 +00:00
new-array p3, v0, [Ljava/lang/Object;
2019-02-17 02:24:41 +00:00
invoke-interface {p2, p1, p3}, Lcom/adjust/sdk/x;->f(Ljava/lang/String;[Ljava/lang/Object;)V
return-void
.end method
.method private d(Lcom/adjust/sdk/c;)V
2019-05-03 18:53:54 +00:00
.locals 4
2019-02-17 02:24:41 +00:00
invoke-virtual {p1}, Lcom/adjust/sdk/c;->T()I
move-result v0
2019-05-03 18:53:54 +00:00
iget-object v1, p0, Lcom/adjust/sdk/as;->bQ:Lcom/adjust/sdk/x;
2019-02-17 02:24:41 +00:00
2019-05-03 18:53:54 +00:00
const/4 v2, 0x1
2019-02-17 02:24:41 +00:00
2019-05-03 18:53:54 +00:00
new-array v2, v2, [Ljava/lang/Object;
2019-02-17 02:24:41 +00:00
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v0
2019-05-03 18:53:54 +00:00
const/4 v3, 0x0
aput-object v0, v2, v3
2019-02-17 02:24:41 +00:00
2019-05-03 18:53:54 +00:00
const-string v0, "Retrying sdk_click package for the %d time"
2019-02-17 02:24:41 +00:00
2019-05-03 18:53:54 +00:00
invoke-interface {v1, v0, v2}, Lcom/adjust/sdk/x;->f(Ljava/lang/String;[Ljava/lang/Object;)V
2019-02-17 02:24:41 +00:00
invoke-virtual {p0, p1}, Lcom/adjust/sdk/as;->b(Lcom/adjust/sdk/c;)V
return-void
.end method
# virtual methods
.method public final ag()V
.locals 1
const/4 v0, 0x1
2019-05-03 18:53:54 +00:00
iput-boolean v0, p0, Lcom/adjust/sdk/as;->dw:Z
2019-02-17 02:24:41 +00:00
return-void
.end method
.method public final ah()V
.locals 1
const/4 v0, 0x0
2019-05-03 18:53:54 +00:00
iput-boolean v0, p0, Lcom/adjust/sdk/as;->dw:Z
2019-02-17 02:24:41 +00:00
invoke-virtual {p0}, Lcom/adjust/sdk/as;->az()V
return-void
.end method
.method public final ak()V
.locals 2
2019-05-03 18:53:54 +00:00
iget-object v0, p0, Lcom/adjust/sdk/as;->bN:Lcom/adjust/sdk/s;
2019-02-17 02:24:41 +00:00
new-instance v1, Lcom/adjust/sdk/as$2;
invoke-direct {v1, p0}, Lcom/adjust/sdk/as$2;-><init>(Lcom/adjust/sdk/as;)V
invoke-virtual {v0, v1}, Lcom/adjust/sdk/s;->submit(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
return-void
.end method
.method final az()V
.locals 2
2019-05-03 18:53:54 +00:00
iget-object v0, p0, Lcom/adjust/sdk/as;->bN:Lcom/adjust/sdk/s;
2019-02-17 02:24:41 +00:00
new-instance v1, Lcom/adjust/sdk/as$3;
invoke-direct {v1, p0}, Lcom/adjust/sdk/as$3;-><init>(Lcom/adjust/sdk/as;)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/c;)V
.locals 2
2019-05-03 18:53:54 +00:00
iget-object v0, p0, Lcom/adjust/sdk/as;->bN:Lcom/adjust/sdk/s;
2019-02-17 02:24:41 +00:00
new-instance v1, Lcom/adjust/sdk/as$1;
invoke-direct {v1, p0, p1}, Lcom/adjust/sdk/as$1;-><init>(Lcom/adjust/sdk/as;Lcom/adjust/sdk/c;)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/v;Z)V
2019-02-04 20:08:30 +00:00
.locals 0
2019-02-17 02:24:41 +00:00
xor-int/lit8 p2, p2, 0x1
2019-05-03 18:53:54 +00:00
iput-boolean p2, p0, Lcom/adjust/sdk/as;->dw:Z
2019-02-17 02:24:41 +00:00
new-instance p2, Ljava/util/ArrayList;
invoke-direct {p2}, Ljava/util/ArrayList;-><init>()V
2019-05-03 18:53:54 +00:00
iput-object p2, p0, Lcom/adjust/sdk/as;->eL:Ljava/util/List;
2019-02-17 02:24:41 +00:00
new-instance p2, Ljava/lang/ref/WeakReference;
invoke-direct {p2, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
2019-05-03 18:53:54 +00:00
iput-object p2, p0, Lcom/adjust/sdk/as;->dt:Ljava/lang/ref/WeakReference;
2019-02-04 20:08:30 +00:00
return-void
.end method