430 lines
10 KiB
Smali
430 lines
10 KiB
Smali
.class public final Lcom/adjust/sdk/an;
|
|
.super Ljava/lang/Object;
|
|
|
|
# interfaces
|
|
.implements Lcom/adjust/sdk/y;
|
|
|
|
|
|
# instance fields
|
|
.field private cg:Lcom/adjust/sdk/s;
|
|
|
|
.field cj:Lcom/adjust/sdk/x;
|
|
|
|
.field context:Landroid/content/Context;
|
|
|
|
.field dB:Lcom/adjust/sdk/z;
|
|
|
|
.field private dN:Ljava/lang/ref/WeakReference;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/lang/ref/WeakReference<",
|
|
"Lcom/adjust/sdk/v;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private dQ:Z
|
|
|
|
.field fg:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lcom/adjust/sdk/c;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field fh:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
.field private fi:Lcom/adjust/sdk/q;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/adjust/sdk/v;Landroid/content/Context;Z)V
|
|
.locals 3
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
new-instance v0, Lcom/adjust/sdk/s;
|
|
|
|
const-string v1, "PackageHandler"
|
|
|
|
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/an;->cg:Lcom/adjust/sdk/s;
|
|
|
|
invoke-static {}, Lcom/adjust/sdk/j;->X()Lcom/adjust/sdk/x;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/adjust/sdk/an;->cj:Lcom/adjust/sdk/x;
|
|
|
|
invoke-static {}, Lcom/adjust/sdk/j;->ad()Lcom/adjust/sdk/q;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/adjust/sdk/an;->fi:Lcom/adjust/sdk/q;
|
|
|
|
invoke-virtual {p0, p1, p2, p3}, Lcom/adjust/sdk/an;->b(Lcom/adjust/sdk/v;Landroid/content/Context;Z)V
|
|
|
|
iget-object p1, p0, Lcom/adjust/sdk/an;->cg:Lcom/adjust/sdk/s;
|
|
|
|
new-instance p2, Lcom/adjust/sdk/an$1;
|
|
|
|
invoke-direct {p2, p0}, Lcom/adjust/sdk/an$1;-><init>(Lcom/adjust/sdk/an;)V
|
|
|
|
invoke-virtual {p1, p2}, Lcom/adjust/sdk/s;->submit(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a(Lcom/adjust/sdk/aq;Lcom/adjust/sdk/c;)V
|
|
.locals 8
|
|
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p1, Lcom/adjust/sdk/aq;->dz:Z
|
|
|
|
iget-object v1, p0, Lcom/adjust/sdk/an;->dN:Ljava/lang/ref/WeakReference;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/adjust/sdk/v;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-interface {v1, p1}, Lcom/adjust/sdk/v;->a(Lcom/adjust/sdk/aq;)V
|
|
|
|
:cond_0
|
|
new-instance p1, Lcom/adjust/sdk/an$5;
|
|
|
|
invoke-direct {p1, p0}, Lcom/adjust/sdk/an$5;-><init>(Lcom/adjust/sdk/an;)V
|
|
|
|
if-nez p2, :cond_1
|
|
|
|
invoke-interface {p1}, Ljava/lang/Runnable;->run()V
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
invoke-virtual {p2}, Lcom/adjust/sdk/c;->T()I
|
|
|
|
move-result p2
|
|
|
|
iget-object v1, p0, Lcom/adjust/sdk/an;->fi:Lcom/adjust/sdk/q;
|
|
|
|
invoke-static {p2, v1}, Lcom/adjust/sdk/ay;->a(ILcom/adjust/sdk/q;)J
|
|
|
|
move-result-wide v1
|
|
|
|
long-to-double v3, v1
|
|
|
|
const-wide v5, 0x408f400000000000L # 1000.0
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Double;->isNaN(D)Z
|
|
|
|
div-double/2addr v3, v5
|
|
|
|
sget-object v5, Lcom/adjust/sdk/ay;->fB:Ljava/text/DecimalFormat;
|
|
|
|
invoke-virtual {v5, v3, v4}, Ljava/text/DecimalFormat;->format(D)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
iget-object v4, p0, Lcom/adjust/sdk/an;->cj:Lcom/adjust/sdk/x;
|
|
|
|
const-string v5, "Waiting for %s seconds before retrying the %d time"
|
|
|
|
const/4 v6, 0x2
|
|
|
|
new-array v6, v6, [Ljava/lang/Object;
|
|
|
|
const/4 v7, 0x0
|
|
|
|
aput-object v3, v6, v7
|
|
|
|
invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p2
|
|
|
|
aput-object p2, v6, v0
|
|
|
|
invoke-interface {v4, v5, v6}, Lcom/adjust/sdk/x;->a(Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
iget-object p2, p0, Lcom/adjust/sdk/an;->cg:Lcom/adjust/sdk/s;
|
|
|
|
sget-object v0, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
invoke-virtual {p2, p1, v1, v2, v0}, Lcom/adjust/sdk/s;->schedule(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final a(Lcom/adjust/sdk/at;)V
|
|
.locals 3
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
new-instance v0, Lcom/adjust/sdk/at;
|
|
|
|
invoke-direct {v0}, Lcom/adjust/sdk/at;-><init>()V
|
|
|
|
iget-object v1, p1, Lcom/adjust/sdk/at;->callbackParameters:Ljava/util/Map;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
iget-object v2, p1, Lcom/adjust/sdk/at;->callbackParameters:Ljava/util/Map;
|
|
|
|
invoke-direct {v1, v2}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
iput-object v1, v0, Lcom/adjust/sdk/at;->callbackParameters:Ljava/util/Map;
|
|
|
|
:cond_0
|
|
iget-object v1, p1, Lcom/adjust/sdk/at;->partnerParameters:Ljava/util/Map;
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
iget-object p1, p1, Lcom/adjust/sdk/at;->partnerParameters:Ljava/util/Map;
|
|
|
|
invoke-direct {v1, p1}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
iput-object v1, v0, Lcom/adjust/sdk/at;->partnerParameters:Ljava/util/Map;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v0, 0x0
|
|
|
|
:cond_2
|
|
:goto_0
|
|
iget-object p1, p0, Lcom/adjust/sdk/an;->cg:Lcom/adjust/sdk/s;
|
|
|
|
new-instance v1, Lcom/adjust/sdk/an$6;
|
|
|
|
invoke-direct {v1, p0, v0}, Lcom/adjust/sdk/an$6;-><init>(Lcom/adjust/sdk/an;Lcom/adjust/sdk/at;)V
|
|
|
|
invoke-virtual {p1, v1}, Lcom/adjust/sdk/s;->submit(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final a(Lcom/adjust/sdk/c;)V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/adjust/sdk/an;->cg:Lcom/adjust/sdk/s;
|
|
|
|
new-instance v1, Lcom/adjust/sdk/an$2;
|
|
|
|
invoke-direct {v1, p0, p1}, Lcom/adjust/sdk/an$2;-><init>(Lcom/adjust/sdk/an;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 ag()V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lcom/adjust/sdk/an;->dQ:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final ah()V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput-boolean v0, p0, Lcom/adjust/sdk/an;->dQ:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final aj()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/adjust/sdk/an;->cg:Lcom/adjust/sdk/s;
|
|
|
|
new-instance v1, Lcom/adjust/sdk/an$3;
|
|
|
|
invoke-direct {v1, p0}, Lcom/adjust/sdk/an$3;-><init>(Lcom/adjust/sdk/an;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/adjust/sdk/s;->submit(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method final at()V
|
|
.locals 4
|
|
|
|
iget-object v0, p0, Lcom/adjust/sdk/an;->fg:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iget-boolean v0, p0, Lcom/adjust/sdk/an;->dQ:Z
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v0, p0, Lcom/adjust/sdk/an;->cj:Lcom/adjust/sdk/x;
|
|
|
|
const-string v2, "Package handler is paused"
|
|
|
|
new-array v1, v1, [Ljava/lang/Object;
|
|
|
|
invoke-interface {v0, v2, v1}, Lcom/adjust/sdk/x;->b(Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
iget-object v0, p0, Lcom/adjust/sdk/an;->fh:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-virtual {v0, v2}, Ljava/util/concurrent/atomic/AtomicBoolean;->getAndSet(Z)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
iget-object v0, p0, Lcom/adjust/sdk/an;->cj:Lcom/adjust/sdk/x;
|
|
|
|
const-string v2, "Package handler is already sending"
|
|
|
|
new-array v1, v1, [Ljava/lang/Object;
|
|
|
|
invoke-interface {v0, v2, v1}, Lcom/adjust/sdk/x;->a(Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
:cond_2
|
|
iget-object v0, p0, Lcom/adjust/sdk/an;->fg:Ljava/util/List;
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/adjust/sdk/c;
|
|
|
|
iget-object v1, p0, Lcom/adjust/sdk/an;->dB:Lcom/adjust/sdk/z;
|
|
|
|
iget-object v3, p0, Lcom/adjust/sdk/an;->fg:Ljava/util/List;
|
|
|
|
invoke-interface {v3}, Ljava/util/List;->size()I
|
|
|
|
move-result v3
|
|
|
|
sub-int/2addr v3, v2
|
|
|
|
invoke-interface {v1, v0, v3}, Lcom/adjust/sdk/z;->a(Lcom/adjust/sdk/c;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method final au()V
|
|
.locals 5
|
|
|
|
iget-object v0, p0, Lcom/adjust/sdk/an;->fg:Ljava/util/List;
|
|
|
|
iget-object v1, p0, Lcom/adjust/sdk/an;->context:Landroid/content/Context;
|
|
|
|
const-string v2, "AdjustIoPackageQueue"
|
|
|
|
const-string v3, "Package queue"
|
|
|
|
invoke-static {v0, v1, v2, v3}, Lcom/adjust/sdk/ay;->a(Ljava/lang/Object;Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lcom/adjust/sdk/an;->cj:Lcom/adjust/sdk/x;
|
|
|
|
const-string v1, "Package handler wrote %d packages"
|
|
|
|
const/4 v2, 0x1
|
|
|
|
new-array v2, v2, [Ljava/lang/Object;
|
|
|
|
iget-object v3, p0, Lcom/adjust/sdk/an;->fg:Ljava/util/List;
|
|
|
|
invoke-interface {v3}, Ljava/util/List;->size()I
|
|
|
|
move-result v3
|
|
|
|
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v3
|
|
|
|
const/4 v4, 0x0
|
|
|
|
aput-object v3, v2, v4
|
|
|
|
invoke-interface {v0, v1, v2}, Lcom/adjust/sdk/x;->b(Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final b(Lcom/adjust/sdk/aq;)V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/adjust/sdk/an;->cg:Lcom/adjust/sdk/s;
|
|
|
|
new-instance v1, Lcom/adjust/sdk/an$4;
|
|
|
|
invoke-direct {v1, p0}, Lcom/adjust/sdk/an$4;-><init>(Lcom/adjust/sdk/an;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/adjust/sdk/s;->submit(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
|
|
|
|
iget-object v0, p0, Lcom/adjust/sdk/an;->dN: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/v;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-interface {v0, p1}, Lcom/adjust/sdk/v;->a(Lcom/adjust/sdk/aq;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final b(Lcom/adjust/sdk/v;Landroid/content/Context;Z)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/an;->dN:Ljava/lang/ref/WeakReference;
|
|
|
|
iput-object p2, p0, Lcom/adjust/sdk/an;->context:Landroid/content/Context;
|
|
|
|
xor-int/lit8 p1, p3, 0x1
|
|
|
|
iput-boolean p1, p0, Lcom/adjust/sdk/an;->dQ:Z
|
|
|
|
return-void
|
|
.end method
|