pull/332/head
gedoor 4 years ago
parent b2ff27aa13
commit 4993a51f7a
  1. 4
      app/src/main/java/io/legado/app/App.kt

@ -6,6 +6,7 @@ import android.content.Context
import android.content.res.Configuration
import android.graphics.Color
import android.os.Build
import android.provider.Settings
import androidx.annotation.RequiresApi
import androidx.appcompat.app.AppCompatDelegate
import androidx.multidex.MultiDexApplication
@ -34,6 +35,8 @@ class App : MultiDexApplication() {
@JvmStatic
lateinit var db: AppDatabase
private set
lateinit var androidId: String
}
var versionCode = 0
@ -42,6 +45,7 @@ class App : MultiDexApplication() {
override fun onCreate() {
super.onCreate()
INSTANCE = this
androidId = Settings.System.getString(contentResolver, Settings.Secure.ANDROID_ID)
CrashHandler().init(this)
LanguageUtils.setConfigurationOld(this)
db = AppDatabase.createDatabase(INSTANCE)

Loading…
Cancel
Save