270 lines
6.9 KiB
Smali
270 lines
6.9 KiB
Smali
.class public final Lcom/discord/utilities/analytics/AdjustConfig;
|
|
.super Ljava/lang/Object;
|
|
.source "AdjustConfig.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/utilities/analytics/AdjustConfig$AdjustLifecycleListener;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final ADJUST_APP_TOKEN:Ljava/lang/String; = "d8fcx8xdmrr4"
|
|
|
|
.field public static final ADJUST_ENVIRONMENT:Ljava/lang/String;
|
|
|
|
.field public static final INSTANCE:Lcom/discord/utilities/analytics/AdjustConfig;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
new-instance v0, Lcom/discord/utilities/analytics/AdjustConfig;
|
|
|
|
invoke-direct {v0}, Lcom/discord/utilities/analytics/AdjustConfig;-><init>()V
|
|
|
|
sput-object v0, Lcom/discord/utilities/analytics/AdjustConfig;->INSTANCE:Lcom/discord/utilities/analytics/AdjustConfig;
|
|
|
|
const-string v0, "production"
|
|
|
|
sput-object v0, Lcom/discord/utilities/analytics/AdjustConfig;->ADJUST_ENVIRONMENT:Ljava/lang/String;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final init(Landroid/app/Application;Z)V
|
|
.locals 7
|
|
|
|
const-string v0, "application"
|
|
|
|
invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
new-instance p2, Lf/c/a/w;
|
|
|
|
sget-object v0, Lcom/discord/utilities/analytics/AdjustConfig;->ADJUST_ENVIRONMENT:Ljava/lang/String;
|
|
|
|
const-string v1, "d8fcx8xdmrr4"
|
|
|
|
invoke-direct {p2, p1, v1, v0}, Lf/c/a/w;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lcom/discord/utilities/analytics/AdjustConfig$init$1$1;->INSTANCE:Lcom/discord/utilities/analytics/AdjustConfig$init$1$1;
|
|
|
|
iput-object v0, p2, Lf/c/a/w;->k:Lf/c/a/g1;
|
|
|
|
invoke-static {}, Lt/a/b/b/a;->w()Lf/c/a/d0;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-virtual {p2}, Lf/c/a/w;->a()Z
|
|
|
|
move-result v3
|
|
|
|
const-string v4, "AdjustConfig not initialized correctly"
|
|
|
|
if-nez v3, :cond_1
|
|
|
|
invoke-static {}, Lf/c/a/a0;->a()Lf/c/a/w0;
|
|
|
|
move-result-object p2
|
|
|
|
new-array v0, v2, [Ljava/lang/Object;
|
|
|
|
invoke-interface {p2, v4, v0}, Lf/c/a/w0;->e(Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_1
|
|
iget-object v3, v0, Lf/c/a/d0;->c:Lf/c/a/u0;
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
invoke-static {}, Lf/c/a/a0;->a()Lf/c/a/w0;
|
|
|
|
move-result-object p2
|
|
|
|
new-array v0, v2, [Ljava/lang/Object;
|
|
|
|
const-string v1, "Adjust already initialized"
|
|
|
|
invoke-interface {p2, v1, v0}, Lf/c/a/w0;->e(Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_2
|
|
iput-object v1, p2, Lf/c/a/w;->u:Ljava/util/List;
|
|
|
|
iput-object v1, p2, Lf/c/a/w;->x:Ljava/lang/String;
|
|
|
|
iget-object v3, v0, Lf/c/a/d0;->a:Ljava/lang/Boolean;
|
|
|
|
iput-object v3, p2, Lf/c/a/w;->y:Ljava/lang/Boolean;
|
|
|
|
iget-boolean v3, v0, Lf/c/a/d0;->b:Z
|
|
|
|
iput-boolean v3, p2, Lf/c/a/w;->z:Z
|
|
|
|
iput-object v1, p2, Lf/c/a/w;->a:Ljava/lang/String;
|
|
|
|
iput-object v1, p2, Lf/c/a/w;->b:Ljava/lang/String;
|
|
|
|
iput-object v1, p2, Lf/c/a/w;->c:Ljava/lang/String;
|
|
|
|
invoke-virtual {p2}, Lf/c/a/w;->a()Z
|
|
|
|
move-result v3
|
|
|
|
if-nez v3, :cond_3
|
|
|
|
invoke-static {}, Lf/c/a/a0;->a()Lf/c/a/w0;
|
|
|
|
move-result-object v3
|
|
|
|
new-array v2, v2, [Ljava/lang/Object;
|
|
|
|
invoke-interface {v3, v4, v2}, Lf/c/a/w0;->e(Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
iget-object v3, p2, Lf/c/a/w;->g:Ljava/lang/String;
|
|
|
|
if-eqz v3, :cond_6
|
|
|
|
invoke-static {}, Landroid/os/Process;->myPid()I
|
|
|
|
move-result v3
|
|
|
|
iget-object v4, p2, Lf/c/a/w;->d:Landroid/content/Context;
|
|
|
|
const-string v5, "activity"
|
|
|
|
invoke-virtual {v4, v5}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Landroid/app/ActivityManager;
|
|
|
|
if-nez v4, :cond_4
|
|
|
|
goto :goto_0
|
|
|
|
:cond_4
|
|
invoke-virtual {v4}, Landroid/app/ActivityManager;->getRunningAppProcesses()Ljava/util/List;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-interface {v4}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v4
|
|
|
|
:cond_5
|
|
invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_6
|
|
|
|
invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
check-cast v5, Landroid/app/ActivityManager$RunningAppProcessInfo;
|
|
|
|
iget v6, v5, Landroid/app/ActivityManager$RunningAppProcessInfo;->pid:I
|
|
|
|
if-ne v6, v3, :cond_5
|
|
|
|
iget-object v3, v5, Landroid/app/ActivityManager$RunningAppProcessInfo;->processName:Ljava/lang/String;
|
|
|
|
iget-object v4, p2, Lf/c/a/w;->g:Ljava/lang/String;
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
|
|
|
|
move-result v3
|
|
|
|
if-nez v3, :cond_6
|
|
|
|
invoke-static {}, Lf/c/a/a0;->a()Lf/c/a/w0;
|
|
|
|
move-result-object v3
|
|
|
|
const/4 v4, 0x1
|
|
|
|
new-array v4, v4, [Ljava/lang/Object;
|
|
|
|
iget-object v5, v5, Landroid/app/ActivityManager$RunningAppProcessInfo;->processName:Ljava/lang/String;
|
|
|
|
aput-object v5, v4, v2
|
|
|
|
const-string v2, "Skipping initialization in background process (%s)"
|
|
|
|
invoke-interface {v3, v2, v4}, Lf/c/a/w0;->h(Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_6
|
|
new-instance v1, Lf/c/a/a;
|
|
|
|
invoke-direct {v1, p2}, Lf/c/a/a;-><init>(Lf/c/a/w;)V
|
|
|
|
:goto_0
|
|
iput-object v1, v0, Lf/c/a/d0;->c:Lf/c/a/u0;
|
|
|
|
iget-object p2, p2, Lf/c/a/w;->d:Landroid/content/Context;
|
|
|
|
new-instance v1, Lf/c/a/b0;
|
|
|
|
invoke-direct {v1, v0, p2}, Lf/c/a/b0;-><init>(Lf/c/a/d0;Landroid/content/Context;)V
|
|
|
|
invoke-static {v1}, Lf/c/a/e2;->G(Ljava/lang/Runnable;)V
|
|
|
|
:goto_1
|
|
sget-object p2, Lcom/discord/utilities/analytics/AdjustConfig$init$2;->INSTANCE:Lcom/discord/utilities/analytics/AdjustConfig$init$2;
|
|
|
|
invoke-static {p1, p2}, Lf/c/a/e2;->i(Landroid/content/Context;Lf/c/a/i1;)V
|
|
|
|
sget-object p2, Lcom/discord/utilities/analytics/InstallReferrer;->Companion:Lcom/discord/utilities/analytics/InstallReferrer$Companion;
|
|
|
|
new-instance v0, Lcom/discord/utilities/analytics/AdjustConfig$init$3;
|
|
|
|
invoke-direct {v0, p1}, Lcom/discord/utilities/analytics/AdjustConfig$init$3;-><init>(Landroid/app/Application;)V
|
|
|
|
invoke-virtual {p2, v0}, Lcom/discord/utilities/analytics/InstallReferrer$Companion;->init(Lkotlin/jvm/functions/Function1;)V
|
|
|
|
new-instance p2, Lcom/discord/utilities/analytics/AdjustConfig$AdjustLifecycleListener;
|
|
|
|
invoke-direct {p2}, Lcom/discord/utilities/analytics/AdjustConfig$AdjustLifecycleListener;-><init>()V
|
|
|
|
invoke-virtual {p1, p2}, Landroid/app/Application;->registerActivityLifecycleCallbacks(Landroid/app/Application$ActivityLifecycleCallbacks;)V
|
|
|
|
return-void
|
|
|
|
:cond_7
|
|
throw v1
|
|
.end method
|