Only restore services when permitted

This commit is contained in:
Mygod
2021-10-29 23:13:24 -04:00
parent e48810d944
commit 1b329558dc
7 changed files with 36 additions and 21 deletions

View File

@@ -48,6 +48,7 @@ class App : Application() {
// alternative to PreferenceManager.getDefaultSharedPreferencesName(this)
deviceStorage.moveSharedPreferencesFrom(this, PreferenceManager(this).sharedPreferencesName)
deviceStorage.moveDatabaseFrom(this, AppDatabase.DB_NAME)
BootReceiver.migrateIfNecessary()
} else deviceStorage = this
Services.init { this }
@@ -92,7 +93,6 @@ class App : Application() {
})
EBegFragment.init()
if (DhcpWorkaround.shouldEnable) DhcpWorkaround.enable(true)
BootReceiver.init()
}
override fun onConfigurationChanged(newConfig: Configuration) {