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