.class public final Lcom/adjust/sdk/ao; .super Ljava/lang/Object; .source "PackageHandler.java" # interfaces .implements Lcom/adjust/sdk/y; # instance fields .field private cd:Lcom/adjust/sdk/s; .field cg:Lcom/adjust/sdk/x; .field context:Landroid/content/Context; .field private dJ:Ljava/lang/ref/WeakReference; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/lang/ref/WeakReference<", "Lcom/adjust/sdk/v;", ">;" } .end annotation .end field .field private dM:Z .field dx:Lcom/adjust/sdk/z; .field fb:Ljava/util/List; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/List<", "Lcom/adjust/sdk/c;", ">;" } .end annotation .end field .field fc:Ljava/util/concurrent/atomic/AtomicBoolean; .field private fd:Lcom/adjust/sdk/q; # direct methods .method public constructor (Lcom/adjust/sdk/v;Landroid/content/Context;Z)V .locals 3 invoke-direct {p0}, Ljava/lang/Object;->()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;->(Ljava/lang/String;Z)V iput-object v0, p0, Lcom/adjust/sdk/ao;->cd: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;->cg: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;->fd: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;->cd:Lcom/adjust/sdk/s; new-instance p2, Lcom/adjust/sdk/ao$1; invoke-direct {p2, p0}, Lcom/adjust/sdk/ao$1;->(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 8 const/4 v0, 0x1 iput-boolean v0, p1, Lcom/adjust/sdk/ar;->dv:Z iget-object v1, p0, Lcom/adjust/sdk/ao;->dJ: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;->(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;->fd: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;->fw: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;->cg: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/ao;->cd: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;->()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;->(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;->(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;->cd:Lcom/adjust/sdk/s; new-instance v1, Lcom/adjust/sdk/ao$6; invoke-direct {v1, p0, v0}, Lcom/adjust/sdk/ao$6;->(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;->cd:Lcom/adjust/sdk/s; new-instance v1, Lcom/adjust/sdk/ao$2; invoke-direct {v1, p0, p1}, Lcom/adjust/sdk/ao$2;->(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;->dM:Z return-void .end method .method public final ah()V .locals 1 const/4 v0, 0x0 iput-boolean v0, p0, Lcom/adjust/sdk/ao;->dM:Z return-void .end method .method public final aj()V .locals 2 iget-object v0, p0, Lcom/adjust/sdk/ao;->cd:Lcom/adjust/sdk/s; new-instance v1, Lcom/adjust/sdk/ao$3; invoke-direct {v1, p0}, Lcom/adjust/sdk/ao$3;->(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;->fb: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;->dM:Z const/4 v1, 0x0 if-eqz v0, :cond_1 iget-object v0, p0, Lcom/adjust/sdk/ao;->cg: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/ao;->fc: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;->cg: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/ao;->fb: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;->dx:Lcom/adjust/sdk/z; iget-object v3, p0, Lcom/adjust/sdk/ao;->fb: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/ao;->fb: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;->cg: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/ao;->fb: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/ar;)V .locals 2 iget-object v0, p0, Lcom/adjust/sdk/ao;->cd:Lcom/adjust/sdk/s; new-instance v1, Lcom/adjust/sdk/ao$4; invoke-direct {v1, p0}, Lcom/adjust/sdk/ao$4;->(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;->dJ: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;->(Ljava/lang/Object;)V iput-object v0, p0, Lcom/adjust/sdk/ao;->dJ: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;->dM:Z return-void .end method