335 lines
9.6 KiB
Smali
335 lines
9.6 KiB
Smali
.class public Lcom/discord/app/App;
|
|
.super Landroid/app/Application;
|
|
.source "App.kt"
|
|
|
|
|
|
# static fields
|
|
.field public static final d:Z
|
|
|
|
.field public static final e:Lcom/discord/app/App;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 4
|
|
|
|
const-string v0, "productionDiscordExternal"
|
|
|
|
const-string v1, "local"
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x2
|
|
|
|
invoke-static {v0, v1, v2, v3}, Lj0/t/p;->contains$default(Ljava/lang/CharSequence;Ljava/lang/CharSequence;ZI)Z
|
|
|
|
move-result v0
|
|
|
|
sput-boolean v0, Lcom/discord/app/App;->d:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Landroid/app/Application;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onCreate()V
|
|
.locals 11
|
|
|
|
invoke-super {p0}, Landroid/app/Application;->onCreate()V
|
|
|
|
sget-object v0, Lcom/discord/utilities/cache/SharedPreferencesProvider;->INSTANCE:Lcom/discord/utilities/cache/SharedPreferencesProvider;
|
|
|
|
invoke-virtual {v0, p0}, Lcom/discord/utilities/cache/SharedPreferencesProvider;->init(Landroid/content/Context;)V
|
|
|
|
sget-object v0, Lcom/discord/utilities/app/ApplicationProvider;->INSTANCE:Lcom/discord/utilities/app/ApplicationProvider;
|
|
|
|
invoke-virtual {v0, p0}, Lcom/discord/utilities/app/ApplicationProvider;->init(Landroid/app/Application;)V
|
|
|
|
sget-object v0, Lcom/discord/utilities/time/ClockFactory;->INSTANCE:Lcom/discord/utilities/time/ClockFactory;
|
|
|
|
invoke-virtual {v0, p0}, Lcom/discord/utilities/time/ClockFactory;->init(Landroid/app/Application;)V
|
|
|
|
invoke-static {p0}, Lcom/discord/app/AppLog;->b(Landroid/app/Application;)V
|
|
|
|
sget-object v0, Lcom/discord/utilities/analytics/AdjustConfig;->INSTANCE:Lcom/discord/utilities/analytics/AdjustConfig;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, p0, v1}, Lcom/discord/utilities/analytics/AdjustConfig;->init(Landroid/app/Application;Z)V
|
|
|
|
invoke-static {p0}, Lcom/miguelgaeta/backgrounded/Backgrounded;->init(Landroid/app/Application;)V
|
|
|
|
sget-object v0, Lcom/discord/utilities/persister/PersisterConfig;->INSTANCE:Lcom/discord/utilities/persister/PersisterConfig;
|
|
|
|
invoke-static {}, Lcom/discord/utilities/time/ClockFactory;->get()Lcom/discord/utilities/time/Clock;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, p0, v1}, Lcom/discord/utilities/persister/PersisterConfig;->init(Landroid/content/Context;Lcom/discord/utilities/time/Clock;)V
|
|
|
|
invoke-static {}, Lcom/miguelgaeta/backgrounded/Backgrounded;->get()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Backgrounded\n .get()"
|
|
|
|
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationBuffered(Lrx/Observable;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lrx/Observable;->q()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/discord/app/App$a;->d:Lcom/discord/app/App$a;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->Q(Lrx/functions/Action1;)Lrx/Subscription;
|
|
|
|
sget-object v0, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
invoke-virtual {v0, p0}, Lcom/discord/utilities/rest/RestAPI$Companion;->init(Landroid/content/Context;)V
|
|
|
|
sget-object v0, Lcom/discord/utilities/fcm/NotificationClient;->INSTANCE:Lcom/discord/utilities/fcm/NotificationClient;
|
|
|
|
invoke-virtual {v0, p0}, Lcom/discord/utilities/fcm/NotificationClient;->init(Landroid/app/Application;)V
|
|
|
|
sget-object v0, Lcom/discord/utilities/images/MGImagesConfig;->INSTANCE:Lcom/discord/utilities/images/MGImagesConfig;
|
|
|
|
invoke-virtual {v0, p0}, Lcom/discord/utilities/images/MGImagesConfig;->init(Landroid/app/Application;)V
|
|
|
|
new-instance v0, Lcom/discord/app/App$b;
|
|
|
|
sget-object v1, Lcom/discord/app/AppLog;->d:Lcom/discord/app/AppLog;
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/app/App$b;-><init>(Lcom/discord/app/AppLog;)V
|
|
|
|
new-instance v1, Lf/a/b/a;
|
|
|
|
invoke-direct {v1, v0}, Lf/a/b/a;-><init>(Lkotlin/jvm/functions/Function3;)V
|
|
|
|
invoke-static {v1}, Lcom/discord/utilities/error/Error;->init(Lrx/functions/Action3;)V
|
|
|
|
sget-object v0, Lcom/discord/utilities/view/text/LinkifiedTextView;->Companion:Lcom/discord/utilities/view/text/LinkifiedTextView$Companion;
|
|
|
|
sget-object v1, Lcom/discord/app/App$c;->d:Lcom/discord/app/App$c;
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/view/text/LinkifiedTextView$Companion;->init(Lkotlin/jvm/functions/Function2;)Lkotlin/Unit;
|
|
|
|
const-string v0, "https://cdn.discordapp.com"
|
|
|
|
invoke-static {v0}, Lcom/discord/models/domain/emoji/ModelEmojiCustom;->setCdnUri(Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lcom/discord/utilities/surveys/SurveyUtils;->INSTANCE:Lcom/discord/utilities/surveys/SurveyUtils;
|
|
|
|
invoke-virtual {v0, p0}, Lcom/discord/utilities/surveys/SurveyUtils;->init(Landroid/app/Application;)V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
invoke-static {v0}, Landroidx/appcompat/app/AppCompatDelegate;->setDefaultNightMode(I)V
|
|
|
|
sget-object v1, Lf/a/b/s0;->d:Lf/a/b/s0;
|
|
|
|
sget-object v9, Lcom/discord/app/AppLog;->d:Lcom/discord/app/AppLog;
|
|
|
|
monitor-enter v1
|
|
|
|
:try_start_0
|
|
const-string v2, "logger"
|
|
|
|
if-eqz v9, :cond_3
|
|
|
|
sget-boolean v2, Lf/a/b/s0;->c:Z
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
monitor-exit v1
|
|
|
|
goto/16 :goto_2
|
|
|
|
:cond_0
|
|
:try_start_1
|
|
sget-object v2, Lf/a/b/s0;->a:Ljava/util/List;
|
|
|
|
invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v10
|
|
|
|
:goto_0
|
|
invoke-interface {v10}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-interface {v10}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
move-object v8, v2
|
|
|
|
check-cast v8, Ljava/lang/String;
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
:try_start_2
|
|
invoke-static {v8}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V
|
|
|
|
sget-object v2, Lf/a/b/s0;->b:Ljava/util/List;
|
|
|
|
invoke-interface {v2, v8}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
const-string v3, "NativeLoader"
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v4, "loaded lib: "
|
|
|
|
invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x4
|
|
|
|
const/4 v7, 0x0
|
|
|
|
move-object v2, v9
|
|
|
|
invoke-static/range {v2 .. v7}, Lcom/discord/utilities/logging/Logger;->d$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ILjava/lang/Object;)V
|
|
:try_end_2
|
|
.catch Ljava/lang/Error; {:try_start_2 .. :try_end_2} :catch_0
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception v2
|
|
|
|
move-object v5, v2
|
|
|
|
:try_start_3
|
|
const-string v3, "NativeLoader"
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v4, "Failed to load lib: "
|
|
|
|
invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/16 v7, 0x8
|
|
|
|
const/4 v8, 0x0
|
|
|
|
move-object v2, v9
|
|
|
|
invoke-static/range {v2 .. v8}, Lcom/discord/utilities/logging/Logger;->e$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;Ljava/util/Map;ILjava/lang/Object;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
sget-object v2, Lf/a/b/s0;->b:Ljava/util/List;
|
|
|
|
invoke-interface {v2}, Ljava/util/List;->size()I
|
|
|
|
move-result v2
|
|
|
|
sget-object v3, Lf/a/b/s0;->a:Ljava/util/List;
|
|
|
|
invoke-interface {v3}, Ljava/util/List;->size()I
|
|
|
|
move-result v3
|
|
|
|
if-eq v2, v3, :cond_2
|
|
|
|
const-string v3, "NativeLoader"
|
|
|
|
const-string v4, "Failed to load all native libs"
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/16 v7, 0xc
|
|
|
|
const/4 v8, 0x0
|
|
|
|
move-object v2, v9
|
|
|
|
invoke-static/range {v2 .. v8}, Lcom/discord/utilities/logging/Logger;->e$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;Ljava/util/Map;ILjava/lang/Object;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
sput-boolean v0, Lf/a/b/s0;->c:Z
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_0
|
|
|
|
:goto_1
|
|
monitor-exit v1
|
|
|
|
:goto_2
|
|
const-string v0, "Application initialized."
|
|
|
|
invoke-static {v0}, Lcom/discord/app/AppLog;->i(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
|
|
:cond_3
|
|
:try_start_4
|
|
invoke-static {v2}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
:try_end_4
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
throw v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit v1
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public onTrimMemory(I)V
|
|
.locals 1
|
|
|
|
invoke-super {p0, p1}, Landroid/app/Application;->onTrimMemory(I)V
|
|
|
|
sget-object v0, Lcom/discord/utilities/images/MGImagesConfig;->INSTANCE:Lcom/discord/utilities/images/MGImagesConfig;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/utilities/images/MGImagesConfig;->onTrimMemory(I)V
|
|
|
|
return-void
|
|
.end method
|