apkfuckery/com.discord/smali/com/adjust/sdk/ao.smali
2019-10-03 04:31:26 +02:00

430 lines
10 KiB
Smali

.class public final Lcom/adjust/sdk/ao;
.super Ljava/lang/Object;
.source "PackageHandler.java"
# interfaces
.implements Lcom/adjust/sdk/y;
# instance fields
.field private bP:Lcom/adjust/sdk/s;
.field bS:Lcom/adjust/sdk/x;
.field context:Landroid/content/Context;
.field dj:Lcom/adjust/sdk/z;
.field private dv:Ljava/lang/ref/WeakReference;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/ref/WeakReference<",
"Lcom/adjust/sdk/v;",
">;"
}
.end annotation
.end field
.field private dy:Z
.field eN:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Lcom/adjust/sdk/c;",
">;"
}
.end annotation
.end field
.field eO:Ljava/util/concurrent/atomic/AtomicBoolean;
.field private eP: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/ao;->bP: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/ao;->bS: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/ao;->eP:Lcom/adjust/sdk/q;
invoke-virtual {p0, p1, p2, p3}, Lcom/adjust/sdk/ao;->b(Lcom/adjust/sdk/v;Landroid/content/Context;Z)V
iget-object p1, p0, Lcom/adjust/sdk/ao;->bP:Lcom/adjust/sdk/s;
new-instance p2, Lcom/adjust/sdk/ao$1;
invoke-direct {p2, p0}, Lcom/adjust/sdk/ao$1;-><init>(Lcom/adjust/sdk/ao;)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/ar;Lcom/adjust/sdk/c;)V
.locals 7
const/4 v0, 0x1
iput-boolean v0, p1, Lcom/adjust/sdk/ar;->dh:Z
iget-object v1, p0, Lcom/adjust/sdk/ao;->dv: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/ar;)V
:cond_0
new-instance p1, Lcom/adjust/sdk/ao$5;
invoke-direct {p1, p0}, Lcom/adjust/sdk/ao$5;-><init>(Lcom/adjust/sdk/ao;)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/ao;->eP:Lcom/adjust/sdk/q;
invoke-static {p2, v1}, Lcom/adjust/sdk/az;->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/az;->fi: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/ao;->bS:Lcom/adjust/sdk/x;
const/4 v5, 0x2
new-array v5, v5, [Ljava/lang/Object;
const/4 v6, 0x0
aput-object v3, v5, v6
invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object p2
aput-object p2, v5, v0
const-string p2, "Waiting for %s seconds before retrying the %d time"
invoke-interface {v4, p2, v5}, Lcom/adjust/sdk/x;->a(Ljava/lang/String;[Ljava/lang/Object;)V
iget-object p2, p0, Lcom/adjust/sdk/ao;->bP: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/au;)V
.locals 3
if-eqz p1, :cond_1
new-instance v0, Lcom/adjust/sdk/au;
invoke-direct {v0}, Lcom/adjust/sdk/au;-><init>()V
iget-object v1, p1, Lcom/adjust/sdk/au;->callbackParameters:Ljava/util/Map;
if-eqz v1, :cond_0
new-instance v1, Ljava/util/HashMap;
iget-object v2, p1, Lcom/adjust/sdk/au;->callbackParameters:Ljava/util/Map;
invoke-direct {v1, v2}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
iput-object v1, v0, Lcom/adjust/sdk/au;->callbackParameters:Ljava/util/Map;
:cond_0
iget-object v1, p1, Lcom/adjust/sdk/au;->partnerParameters:Ljava/util/Map;
if-eqz v1, :cond_2
new-instance v1, Ljava/util/HashMap;
iget-object p1, p1, Lcom/adjust/sdk/au;->partnerParameters:Ljava/util/Map;
invoke-direct {v1, p1}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
iput-object v1, v0, Lcom/adjust/sdk/au;->partnerParameters:Ljava/util/Map;
goto :goto_0
:cond_1
const/4 v0, 0x0
:cond_2
:goto_0
iget-object p1, p0, Lcom/adjust/sdk/ao;->bP:Lcom/adjust/sdk/s;
new-instance v1, Lcom/adjust/sdk/ao$6;
invoke-direct {v1, p0, v0}, Lcom/adjust/sdk/ao$6;-><init>(Lcom/adjust/sdk/ao;Lcom/adjust/sdk/au;)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/ao;->bP:Lcom/adjust/sdk/s;
new-instance v1, Lcom/adjust/sdk/ao$2;
invoke-direct {v1, p0, p1}, Lcom/adjust/sdk/ao$2;-><init>(Lcom/adjust/sdk/ao;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/ao;->dy:Z
return-void
.end method
.method public final ah()V
.locals 1
const/4 v0, 0x0
iput-boolean v0, p0, Lcom/adjust/sdk/ao;->dy:Z
return-void
.end method
.method public final aj()V
.locals 2
iget-object v0, p0, Lcom/adjust/sdk/ao;->bP:Lcom/adjust/sdk/s;
new-instance v1, Lcom/adjust/sdk/ao$3;
invoke-direct {v1, p0}, Lcom/adjust/sdk/ao$3;-><init>(Lcom/adjust/sdk/ao;)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/ao;->eN: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/ao;->dy:Z
const/4 v1, 0x0
if-eqz v0, :cond_1
iget-object v0, p0, Lcom/adjust/sdk/ao;->bS:Lcom/adjust/sdk/x;
new-array v1, v1, [Ljava/lang/Object;
const-string v2, "Package handler is paused"
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/ao;->eO: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/ao;->bS:Lcom/adjust/sdk/x;
new-array v1, v1, [Ljava/lang/Object;
const-string v2, "Package handler is already sending"
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/ao;->eN: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/ao;->dj:Lcom/adjust/sdk/z;
iget-object v3, p0, Lcom/adjust/sdk/ao;->eN: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 4
iget-object v0, p0, Lcom/adjust/sdk/ao;->eN:Ljava/util/List;
iget-object v1, p0, Lcom/adjust/sdk/ao;->context:Landroid/content/Context;
const-string v2, "AdjustIoPackageQueue"
const-string v3, "Package queue"
invoke-static {v0, v1, v2, v3}, Lcom/adjust/sdk/az;->a(Ljava/lang/Object;Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
iget-object v0, p0, Lcom/adjust/sdk/ao;->bS:Lcom/adjust/sdk/x;
const/4 v1, 0x1
new-array v1, v1, [Ljava/lang/Object;
iget-object v2, p0, Lcom/adjust/sdk/ao;->eN:Ljava/util/List;
invoke-interface {v2}, Ljava/util/List;->size()I
move-result v2
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
const/4 v3, 0x0
aput-object v2, v1, v3
const-string v2, "Package handler wrote %d packages"
invoke-interface {v0, v2, v1}, Lcom/adjust/sdk/x;->b(Ljava/lang/String;[Ljava/lang/Object;)V
return-void
.end method
.method public final b(Lcom/adjust/sdk/ar;)V
.locals 2
iget-object v0, p0, Lcom/adjust/sdk/ao;->bP:Lcom/adjust/sdk/s;
new-instance v1, Lcom/adjust/sdk/ao$4;
invoke-direct {v1, p0}, Lcom/adjust/sdk/ao$4;-><init>(Lcom/adjust/sdk/ao;)V
invoke-virtual {v0, v1}, Lcom/adjust/sdk/s;->submit(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
iget-object v0, p0, Lcom/adjust/sdk/ao;->dv: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/ar;)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/ao;->dv:Ljava/lang/ref/WeakReference;
iput-object p2, p0, Lcom/adjust/sdk/ao;->context:Landroid/content/Context;
xor-int/lit8 p1, p3, 0x1
iput-boolean p1, p0, Lcom/adjust/sdk/ao;->dy:Z
return-void
.end method