mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix: spotless (#4604)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
parent
ac5a1714e0
commit
5a0913a1d7
2 changed files with 5 additions and 9 deletions
|
|
@ -52,7 +52,7 @@ open class MeshUtilApplication :
|
|||
Application(),
|
||||
Configuration.Provider {
|
||||
@Inject lateinit var workerFactory: HiltWorkerFactory
|
||||
|
||||
|
||||
private val applicationScope = CoroutineScope(Dispatchers.Default)
|
||||
|
||||
override fun onCreate() {
|
||||
|
|
@ -64,9 +64,7 @@ open class MeshUtilApplication :
|
|||
|
||||
// Initialize DatabaseManager asynchronously with current device address so DAO consumers have an active DB
|
||||
val entryPoint = EntryPointAccessors.fromApplication(this, AppEntryPoint::class.java)
|
||||
applicationScope.launch {
|
||||
entryPoint.databaseManager().init(entryPoint.meshPrefs().deviceAddress)
|
||||
}
|
||||
applicationScope.launch { entryPoint.databaseManager().init(entryPoint.meshPrefs().deviceAddress) }
|
||||
}
|
||||
|
||||
override fun onTerminate() {
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ import dagger.hilt.android.EntryPointAccessors
|
|||
/**
|
||||
* A lightweight application class for Robolectric tests.
|
||||
*
|
||||
* It prevents heavy background initialization (WorkManager, DatabaseManager) by default
|
||||
* to avoid resource leaks and flaky native SQLite issues on the JVM.
|
||||
* It prevents heavy background initialization (WorkManager, DatabaseManager) by default to avoid resource leaks and
|
||||
* flaky native SQLite issues on the JVM.
|
||||
*/
|
||||
class MeshTestApplication : MeshUtilApplication() {
|
||||
|
||||
|
|
@ -43,9 +43,7 @@ class MeshTestApplication : MeshUtilApplication() {
|
|||
}
|
||||
|
||||
override val workManagerConfiguration: Configuration
|
||||
get() = Configuration.Builder()
|
||||
.setMinimumLoggingLevel(android.util.Log.DEBUG)
|
||||
.build()
|
||||
get() = Configuration.Builder().setMinimumLoggingLevel(android.util.Log.DEBUG).build()
|
||||
|
||||
companion object {
|
||||
/** Set to true in a test @Before block if you need real DB/WorkManager init. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue