From caf325f24083a730e8441f0dc87e1e0190c7f876 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Sat, 6 Sep 2025 10:29:52 -0400 Subject: [PATCH] Sets the instance of the Application class before anything else --- amethyst/src/main/java/com/vitorpamplona/amethyst/Amethyst.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/Amethyst.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/Amethyst.kt index d5b850e1c..58102bb98 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/Amethyst.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/Amethyst.kt @@ -176,11 +176,10 @@ class Amethyst : Application() { override fun onCreate() { super.onCreate() Log.d("AmethystApp", "onCreate $this") + instance = this Thread.setDefaultUncaughtExceptionHandler(UnexpectedCrashSaver(crashReportCache, applicationIOScope)) - instance = this - if (isDebug) { Logging.setup() }