Loading app/src/main/java/foundation/e/apps/AppLoungeApplication.kt +21 −21 Original line number Diff line number Diff line Loading @@ -92,13 +92,6 @@ class AppLoungeApplication : Application(), Configuration.Provider { registerReceiver(pkgManagerBR, appLoungePackageManager.getFilter(), RECEIVER_EXPORTED) coroutineScope.launch { val currentVersion = sessionRepository.awaitTosVersion() if (!currentVersion.contentEquals(TOS_VERSION)) { sessionRepository.saveTocStatus(false, "") } } if (BuildConfig.DEBUG) { plant(Timber.DebugTree()) } else { Loading @@ -118,6 +111,17 @@ class AppLoungeApplication : Application(), Configuration.Provider { }) } // Robolectric eagerly creates the real Application for many unrelated unit tests. // Skip runtime startup jobs there to avoid leaking WorkManager/Room/DataStore work // across otherwise isolated tests. if (!isRunningUnderRobolectric()) { coroutineScope.launch { val currentVersion = sessionRepository.awaitTosVersion() if (!currentVersion.contentEquals(TOS_VERSION)) { sessionRepository.saveTocStatus(false, "") } } coroutineScope.launch { migrateAnonymousUserUpdateIntervalUseCase() val updateInterval = getUpdateIntervalUseCase() Loading @@ -128,14 +132,10 @@ class AppLoungeApplication : Application(), Configuration.Provider { ) } // Robolectric eagerly creates the real Application for many unrelated tests. // Skip install DB cleanup there to avoid background Room work leaking across tests. if (!isRunningUnderRobolectric()) { removeStalledInstallationFromDb() } installOrchestrator.init() } } private fun isRunningUnderRobolectric(): Boolean = Build.FINGERPRINT == "robolectric" Loading Loading
app/src/main/java/foundation/e/apps/AppLoungeApplication.kt +21 −21 Original line number Diff line number Diff line Loading @@ -92,13 +92,6 @@ class AppLoungeApplication : Application(), Configuration.Provider { registerReceiver(pkgManagerBR, appLoungePackageManager.getFilter(), RECEIVER_EXPORTED) coroutineScope.launch { val currentVersion = sessionRepository.awaitTosVersion() if (!currentVersion.contentEquals(TOS_VERSION)) { sessionRepository.saveTocStatus(false, "") } } if (BuildConfig.DEBUG) { plant(Timber.DebugTree()) } else { Loading @@ -118,6 +111,17 @@ class AppLoungeApplication : Application(), Configuration.Provider { }) } // Robolectric eagerly creates the real Application for many unrelated unit tests. // Skip runtime startup jobs there to avoid leaking WorkManager/Room/DataStore work // across otherwise isolated tests. if (!isRunningUnderRobolectric()) { coroutineScope.launch { val currentVersion = sessionRepository.awaitTosVersion() if (!currentVersion.contentEquals(TOS_VERSION)) { sessionRepository.saveTocStatus(false, "") } } coroutineScope.launch { migrateAnonymousUserUpdateIntervalUseCase() val updateInterval = getUpdateIntervalUseCase() Loading @@ -128,14 +132,10 @@ class AppLoungeApplication : Application(), Configuration.Provider { ) } // Robolectric eagerly creates the real Application for many unrelated tests. // Skip install DB cleanup there to avoid background Room work leaking across tests. if (!isRunningUnderRobolectric()) { removeStalledInstallationFromDb() } installOrchestrator.init() } } private fun isRunningUnderRobolectric(): Boolean = Build.FINGERPRINT == "robolectric" Loading