Skip to content
Snippets Groups Projects
Commit 26b2a5aa authored by Nicolas Pomepuy's avatar Nicolas Pomepuy
Browse files

Apply the VersionMigration sooner

It can be useful when trying to migrate settings used by the
VLCInstance init to make sure the setting is migrated before
parent f794ffbe
No related branches found
No related tags found
1 merge request!1548Apply the VersionMigration sooner + subtitle migration
......@@ -91,13 +91,13 @@ class AppSetupDelegate : AppDelegate,
// init operations executed in background threads
private fun Context.backgroundInit() = AppScope.launch outerLaunch@ {
VersionMigration.migrateVersion(this@backgroundInit)
launch(Dispatchers.IO) innerLaunch@ {
if (!VLCInstance.testCompatibleCPU(AppContextProvider.appContext)) return@innerLaunch
Dialog.setCallbacks(VLCInstance.getInstance(this@backgroundInit), DialogDelegate)
}
packageManager.setComponentEnabledSetting(ComponentName(this@backgroundInit, SendCrashActivity::class.java),
if (BuildConfig.BETA) PackageManager.COMPONENT_ENABLED_STATE_ENABLED else PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP)
VersionMigration.migrateVersion(this@backgroundInit)
if (!AndroidDevices.isAndroidTv) sendBroadcast(Intent(MiniPlayerAppWidgetProvider.ACTION_WIDGET_INIT).apply {
component = ComponentName(appContextProvider.appContext, MiniPlayerAppWidgetProvider::class.java)
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment