Files
mobile-android/app/src/main/java/com/rosetta/messenger/RosettaApplication.kt

49 lines
1.4 KiB
Kotlin
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package com.rosetta.messenger
import android.app.Application
import com.airbnb.lottie.L
import com.rosetta.messenger.data.DraftManager
import com.rosetta.messenger.network.TransportManager
import com.rosetta.messenger.update.UpdateManager
import com.rosetta.messenger.utils.CrashReportManager
/**
* Application класс для инициализации глобальных компонентов приложения
*/
class RosettaApplication : Application() {
companion object {
private const val TAG = "RosettaApplication"
}
override fun onCreate() {
super.onCreate()
// Убираем красную букву "L" от Lottie
L.setTraceEnabled(false)
// Инициализируем crash reporter
initCrashReporting()
// Инициализируем менеджер черновиков
DraftManager.init(this)
// Инициализируем менеджер транспорта файлов (streaming download)
TransportManager.init(this)
// Инициализируем менеджер обновлений (SDU)
UpdateManager.init(this)
}
/**
* Инициализация системы сбора crash reports
*/
private fun initCrashReporting() {
try {
CrashReportManager.init(this)
} catch (e: Exception) {
}
}
}