mirror of https://github.com/readrops/Readrops.git
Display CrashActivity only in release mode
This commit is contained in:
parent
e9cd681b11
commit
b74ad09a07
|
@ -26,6 +26,7 @@ open class ReadropsApp : Application(), KoinComponent, ImageLoaderFactory {
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
|
|
||||||
|
if (!BuildConfig.DEBUG) {
|
||||||
Thread.setDefaultUncaughtExceptionHandler { _, throwable ->
|
Thread.setDefaultUncaughtExceptionHandler { _, throwable ->
|
||||||
val intent = Intent(this, CrashActivity::class.java).apply {
|
val intent = Intent(this, CrashActivity::class.java).apply {
|
||||||
putExtra(CrashActivity.THROWABLE_KEY, throwable)
|
putExtra(CrashActivity.THROWABLE_KEY, throwable)
|
||||||
|
@ -36,6 +37,7 @@ open class ReadropsApp : Application(), KoinComponent, ImageLoaderFactory {
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
exitProcess(0)
|
exitProcess(0)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
startKoin {
|
startKoin {
|
||||||
androidLogger(Level.ERROR)
|
androidLogger(Level.ERROR)
|
||||||
|
|
Loading…
Reference in New Issue