mirror of
https://github.com/gedoor/legado.git
synced 2024-09-01 09:34:25 +08:00
优化
This commit is contained in:
parent
9e6ece9a39
commit
cb7cec81fd
@ -17,12 +17,16 @@ import io.legado.app.help.ThemeConfig.applyDayNight
|
||||
import io.legado.app.help.http.cronet.CronetLoader
|
||||
import io.legado.app.utils.LanguageUtils
|
||||
import io.legado.app.utils.defaultSharedPreferences
|
||||
import timber.log.Timber
|
||||
|
||||
class App : MultiDexApplication() {
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
CrashHandler(this)
|
||||
if (BuildConfig.DEBUG) {
|
||||
Timber.plant(Timber.DebugTree())
|
||||
}
|
||||
//预下载Cronet so
|
||||
CronetLoader.preDownload()
|
||||
LanguageUtils.setConfiguration(this)
|
||||
|
@ -13,6 +13,7 @@ import io.legado.app.utils.*
|
||||
import kotlinx.coroutines.Dispatchers.IO
|
||||
import kotlinx.coroutines.withContext
|
||||
import splitties.init.appCtx
|
||||
import timber.log.Timber
|
||||
import java.io.File
|
||||
|
||||
/**
|
||||
@ -568,8 +569,10 @@ object ReadBookConfig {
|
||||
BitmapUtils.decodeBitmap(curBgStr(), width, height)
|
||||
)
|
||||
}
|
||||
} catch (e: OutOfMemoryError) {
|
||||
Timber.e(e)
|
||||
} catch (e: Exception) {
|
||||
e.printOnDebug()
|
||||
Timber.e(e)
|
||||
}
|
||||
return bgDrawable ?: ColorDrawable(appCtx.getCompatColor(R.color.background))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user