Skip to content

Commit

Permalink
Ensure logcat helper is initialized before setting uncaught exception…
Browse files Browse the repository at this point in the history
… handler

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
  • Loading branch information
chenxiaolong committed Oct 26, 2024
1 parent 91f3f04 commit b9b714a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/com/chiller3/rsaf/MainApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ class MainApplication : Application(), SharedPreferences.OnSharedPreferenceChang
override fun onCreate() {
super.onCreate()

Logcat.init(this)

val oldCrashHandler = Thread.getDefaultUncaughtExceptionHandler()

Thread.setDefaultUncaughtExceptionHandler { t, e ->
Expand All @@ -40,8 +42,6 @@ class MainApplication : Application(), SharedPreferences.OnSharedPreferenceChang

backupManager = BackupManager(this)

Logcat.init(this)

Notifications(this).updateChannels()

// Enable Material You colors
Expand Down

0 comments on commit b9b714a

Please sign in to comment.