apkfuckery/com.discord/smali/f/c/a/o1.smali
2020-11-12 02:11:44 +00:00

553 lines
11 KiB
Smali

.class public Lf/c/a/o1;
.super Ljava/lang/Object;
.source "PackageHandler.java"
# interfaces
.implements Lf/c/a/x0;
# instance fields
.field public a:Lf/c/a/f2/h;
.field public b:Lf/c/a/y0;
.field public c:Ljava/lang/ref/WeakReference;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/ref/WeakReference<",
"Lf/c/a/u0;",
">;"
}
.end annotation
.end field
.field public d:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Lf/c/a/u;",
">;"
}
.end annotation
.end field
.field public e:Ljava/util/concurrent/atomic/AtomicBoolean;
.field public f:Z
.field public g:Landroid/content/Context;
.field public h:Lf/c/a/w0;
.field public i:Lf/c/a/o0;
.field public j:Lf/c/a/o0;
.field public k:Ljava/lang/String;
.field public l:Ljava/lang/String;
.field public m:Ljava/lang/String;
# direct methods
.method public constructor <init>(Lf/c/a/u0;Landroid/content/Context;Z)V
.locals 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
new-instance v0, Lf/c/a/f2/c;
const-string v1, "PackageHandler"
invoke-direct {v0, v1}, Lf/c/a/f2/c;-><init>(Ljava/lang/String;)V
iput-object v0, p0, Lf/c/a/o1;->a:Lf/c/a/f2/h;
invoke-static {}, Lf/c/a/a0;->a()Lf/c/a/w0;
move-result-object v0
iput-object v0, p0, Lf/c/a/o1;->h:Lf/c/a/w0;
sget-object v0, Lf/c/a/o0;->d:Lf/c/a/o0;
iput-object v0, p0, Lf/c/a/o1;->i:Lf/c/a/o0;
sget-object v0, Lf/c/a/o0;->e:Lf/c/a/o0;
iput-object v0, p0, Lf/c/a/o1;->j:Lf/c/a/o0;
invoke-virtual {p0, p1, p2, p3}, Lf/c/a/o1;->k(Lf/c/a/u0;Landroid/content/Context;Z)V
iget-object p1, p0, Lf/c/a/o1;->a:Lf/c/a/f2/h;
new-instance p2, Lf/c/a/o1$a;
invoke-direct {p2, p0}, Lf/c/a/o1$a;-><init>(Lf/c/a/o1;)V
check-cast p1, Lf/c/a/f2/c;
invoke-virtual {p1, p2}, Lf/c/a/f2/c;->c(Ljava/lang/Runnable;)V
return-void
.end method
# virtual methods
.method public a()Ljava/lang/String;
.locals 1
iget-object v0, p0, Lf/c/a/o1;->k:Ljava/lang/String;
return-object v0
.end method
.method public b()Ljava/lang/String;
.locals 1
iget-object v0, p0, Lf/c/a/o1;->l:Ljava/lang/String;
return-object v0
.end method
.method public c()Ljava/lang/String;
.locals 1
iget-object v0, p0, Lf/c/a/o1;->m:Ljava/lang/String;
return-object v0
.end method
.method public d()V
.locals 1
const/4 v0, 0x1
iput-boolean v0, p0, Lf/c/a/o1;->f:Z
return-void
.end method
.method public e()V
.locals 2
iget-object v0, p0, Lf/c/a/o1;->a:Lf/c/a/f2/h;
new-instance v1, Lf/c/a/o1$c;
invoke-direct {v1, p0}, Lf/c/a/o1$c;-><init>(Lf/c/a/o1;)V
check-cast v0, Lf/c/a/f2/c;
invoke-virtual {v0, v1}, Lf/c/a/f2/c;->c(Ljava/lang/Runnable;)V
return-void
.end method
.method public f(Lf/c/a/r1;)V
.locals 2
iget-object v0, p0, Lf/c/a/o1;->a:Lf/c/a/f2/h;
new-instance v1, Lf/c/a/o1$d;
invoke-direct {v1, p0}, Lf/c/a/o1$d;-><init>(Lf/c/a/o1;)V
check-cast v0, Lf/c/a/f2/c;
invoke-virtual {v0, v1}, Lf/c/a/f2/c;->c(Ljava/lang/Runnable;)V
iget-object v0, p0, Lf/c/a/o1;->c:Ljava/lang/ref/WeakReference;
invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lf/c/a/u0;
if-eqz v0, :cond_0
invoke-interface {v0, p1}, Lf/c/a/u0;->e(Lf/c/a/r1;)V
:cond_0
return-void
.end method
.method public flush()V
.locals 2
iget-object v0, p0, Lf/c/a/o1;->a:Lf/c/a/f2/h;
new-instance v1, Lf/c/a/o1$g;
invoke-direct {v1, p0}, Lf/c/a/o1$g;-><init>(Lf/c/a/o1;)V
check-cast v0, Lf/c/a/f2/c;
invoke-virtual {v0, v1}, Lf/c/a/f2/c;->c(Ljava/lang/Runnable;)V
return-void
.end method
.method public g(Lf/c/a/u;)V
.locals 2
iget-object v0, p0, Lf/c/a/o1;->a:Lf/c/a/f2/h;
new-instance v1, Lf/c/a/o1$b;
invoke-direct {v1, p0, p1}, Lf/c/a/o1$b;-><init>(Lf/c/a/o1;Lf/c/a/u;)V
check-cast v0, Lf/c/a/f2/c;
invoke-virtual {v0, v1}, Lf/c/a/f2/c;->c(Ljava/lang/Runnable;)V
return-void
.end method
.method public h(Lf/c/a/x1;)V
.locals 3
if-eqz p1, :cond_1
new-instance v0, Lf/c/a/x1;
invoke-direct {v0}, Lf/c/a/x1;-><init>()V
iget-object v1, p1, Lf/c/a/x1;->a:Ljava/util/Map;
if-eqz v1, :cond_0
new-instance v1, Ljava/util/HashMap;
iget-object v2, p1, Lf/c/a/x1;->a:Ljava/util/Map;
invoke-direct {v1, v2}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
iput-object v1, v0, Lf/c/a/x1;->a:Ljava/util/Map;
:cond_0
iget-object v1, p1, Lf/c/a/x1;->b:Ljava/util/Map;
if-eqz v1, :cond_2
new-instance v1, Ljava/util/HashMap;
iget-object p1, p1, Lf/c/a/x1;->b:Ljava/util/Map;
invoke-direct {v1, p1}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
iput-object v1, v0, Lf/c/a/x1;->b:Ljava/util/Map;
goto :goto_0
:cond_1
const/4 v0, 0x0
:cond_2
:goto_0
iget-object p1, p0, Lf/c/a/o1;->a:Lf/c/a/f2/h;
new-instance v1, Lf/c/a/o1$f;
invoke-direct {v1, p0, v0}, Lf/c/a/o1$f;-><init>(Lf/c/a/o1;Lf/c/a/x1;)V
check-cast p1, Lf/c/a/f2/c;
invoke-virtual {p1, v1}, Lf/c/a/f2/c;->c(Ljava/lang/Runnable;)V
return-void
.end method
.method public i(Lf/c/a/r1;Lf/c/a/u;)V
.locals 9
const/4 v0, 0x1
iput-boolean v0, p1, Lf/c/a/r1;->b:Z
iget-object v1, p0, Lf/c/a/o1;->c:Ljava/lang/ref/WeakReference;
invoke-virtual {v1}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lf/c/a/u0;
if-eqz v1, :cond_0
invoke-interface {v1, p1}, Lf/c/a/u0;->e(Lf/c/a/r1;)V
:cond_0
new-instance p1, Lf/c/a/o1$e;
invoke-direct {p1, p0}, Lf/c/a/o1$e;-><init>(Lf/c/a/o1;)V
iget v1, p2, Lf/c/a/u;->retries:I
add-int/2addr v1, v0
iput v1, p2, Lf/c/a/u;->retries:I
new-instance v2, Lf/c/a/z1;
iget-object v3, p0, Lf/c/a/o1;->g:Landroid/content/Context;
invoke-direct {v2, v3}, Lf/c/a/z1;-><init>(Landroid/content/Context;)V
iget-object p2, p2, Lf/c/a/u;->activityKind:Lf/c/a/t;
sget-object v3, Lf/c/a/t;->e:Lf/c/a/t;
const/4 v4, 0x0
if-ne p2, v3, :cond_1
monitor-enter v2
:try_start_0
const-string p2, "install_tracked"
invoke-virtual {v2, p2, v4}, Lf/c/a/z1;->a(Ljava/lang/String;Z)Z
move-result p2
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit v2
if-nez p2, :cond_1
iget-object p2, p0, Lf/c/a/o1;->j:Lf/c/a/o0;
invoke-static {v1, p2}, Lf/c/a/e2;->q(ILf/c/a/o0;)J
move-result-wide v2
goto :goto_0
:catchall_0
move-exception p1
monitor-exit v2
throw p1
:cond_1
iget-object p2, p0, Lf/c/a/o1;->i:Lf/c/a/o0;
invoke-static {v1, p2}, Lf/c/a/e2;->q(ILf/c/a/o0;)J
move-result-wide v2
:goto_0
long-to-double v5, v2
const-wide v7, 0x408f400000000000L # 1000.0
div-double/2addr v5, v7
sget-object p2, Lf/c/a/e2;->a:Ljava/text/DecimalFormat;
invoke-virtual {p2, v5, v6}, Ljava/text/DecimalFormat;->format(D)Ljava/lang/String;
move-result-object p2
iget-object v5, p0, Lf/c/a/o1;->h:Lf/c/a/w0;
const-string v6, "Waiting for %s seconds before retrying the %d time"
const/4 v7, 0x2
new-array v7, v7, [Ljava/lang/Object;
aput-object p2, v7, v4
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object p2
aput-object p2, v7, v0
invoke-interface {v5, v6, v7}, Lf/c/a/w0;->g(Ljava/lang/String;[Ljava/lang/Object;)V
iget-object p2, p0, Lf/c/a/o1;->a:Lf/c/a/f2/h;
check-cast p2, Lf/c/a/f2/c;
invoke-virtual {p2, p1, v2, v3}, Lf/c/a/f2/c;->b(Ljava/lang/Runnable;J)V
return-void
.end method
.method public j()V
.locals 1
const/4 v0, 0x0
iput-boolean v0, p0, Lf/c/a/o1;->f:Z
return-void
.end method
.method public k(Lf/c/a/u0;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, Lf/c/a/o1;->c:Ljava/lang/ref/WeakReference;
iput-object p2, p0, Lf/c/a/o1;->g:Landroid/content/Context;
xor-int/lit8 p2, p3, 0x1
iput-boolean p2, p0, Lf/c/a/o1;->f:Z
invoke-interface {p1}, Lf/c/a/u0;->a()Ljava/lang/String;
move-result-object p2
iput-object p2, p0, Lf/c/a/o1;->k:Ljava/lang/String;
invoke-interface {p1}, Lf/c/a/u0;->b()Ljava/lang/String;
move-result-object p2
iput-object p2, p0, Lf/c/a/o1;->l:Ljava/lang/String;
invoke-interface {p1}, Lf/c/a/u0;->c()Ljava/lang/String;
move-result-object p1
iput-object p1, p0, Lf/c/a/o1;->m:Ljava/lang/String;
return-void
.end method
.method public final l()V
.locals 5
iget-object v0, p0, Lf/c/a/o1;->d: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, Lf/c/a/o1;->f:Z
const/4 v1, 0x0
if-eqz v0, :cond_1
iget-object v0, p0, Lf/c/a/o1;->h:Lf/c/a/w0;
new-array v1, v1, [Ljava/lang/Object;
const-string v2, "Package handler is paused"
invoke-interface {v0, v2, v1}, Lf/c/a/w0;->f(Ljava/lang/String;[Ljava/lang/Object;)V
return-void
:cond_1
iget-object v0, p0, Lf/c/a/o1;->e: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, Lf/c/a/o1;->h:Lf/c/a/w0;
new-array v1, v1, [Ljava/lang/Object;
const-string v2, "Package handler is already sending"
invoke-interface {v0, v2, v1}, Lf/c/a/w0;->g(Ljava/lang/String;[Ljava/lang/Object;)V
return-void
:cond_2
iget-object v0, p0, Lf/c/a/o1;->d:Ljava/util/List;
invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lf/c/a/u;
iget-object v1, p0, Lf/c/a/o1;->b:Lf/c/a/y0;
iget-object v3, p0, Lf/c/a/o1;->d:Ljava/util/List;
invoke-interface {v3}, Ljava/util/List;->size()I
move-result v3
sub-int/2addr v3, v2
check-cast v1, Lf/c/a/q1;
iget-object v2, v1, Lf/c/a/q1;->a:Lf/c/a/f2/h;
new-instance v4, Lf/c/a/p1;
invoke-direct {v4, v1, v0, v3}, Lf/c/a/p1;-><init>(Lf/c/a/q1;Lf/c/a/u;I)V
check-cast v2, Lf/c/a/f2/c;
invoke-virtual {v2, v4}, Lf/c/a/f2/c;->c(Ljava/lang/Runnable;)V
return-void
.end method
.method public final m()V
.locals 4
iget-object v0, p0, Lf/c/a/o1;->d:Ljava/util/List;
iget-object v1, p0, Lf/c/a/o1;->g:Landroid/content/Context;
const-string v2, "AdjustIoPackageQueue"
const-string v3, "Package queue"
invoke-static {v0, v1, v2, v3}, Lf/c/a/e2;->I(Ljava/lang/Object;Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
iget-object v0, p0, Lf/c/a/o1;->h:Lf/c/a/w0;
const/4 v1, 0x1
new-array v1, v1, [Ljava/lang/Object;
iget-object v2, p0, Lf/c/a/o1;->d: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}, Lf/c/a/w0;->f(Ljava/lang/String;[Ljava/lang/Object;)V
return-void
.end method