mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
feat(desktop): add entitlements and wire MeshConnectionManager into orchestrator (#5127)
This commit is contained in:
parent
c6f58cc799
commit
099aea2d81
5 changed files with 32 additions and 8 deletions
|
|
@ -26,6 +26,7 @@ import org.koin.core.annotation.Named
|
|||
import org.koin.core.annotation.Single
|
||||
import org.meshtastic.core.common.database.DatabaseManager
|
||||
import org.meshtastic.core.common.util.handledLaunch
|
||||
import org.meshtastic.core.repository.MeshConnectionManager
|
||||
import org.meshtastic.core.repository.MeshMessageProcessor
|
||||
import org.meshtastic.core.repository.MeshRouter
|
||||
import org.meshtastic.core.repository.MeshServiceNotifications
|
||||
|
|
@ -57,6 +58,7 @@ class MeshServiceOrchestrator(
|
|||
private val takMeshIntegration: TAKMeshIntegration,
|
||||
private val takPrefs: TakPrefs,
|
||||
private val databaseManager: DatabaseManager,
|
||||
private val connectionManager: MeshConnectionManager,
|
||||
@Named("ServiceScope") private val scope: CoroutineScope,
|
||||
) {
|
||||
private var serviceJob: Job? = null
|
||||
|
|
@ -87,6 +89,7 @@ class MeshServiceOrchestrator(
|
|||
serviceJob = job
|
||||
|
||||
serviceNotifications.initChannels()
|
||||
connectionManager.updateStatusNotification()
|
||||
|
||||
// Observe TAK server pref to start/stop
|
||||
takJob =
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ import org.meshtastic.core.model.service.ServiceAction
|
|||
import org.meshtastic.core.repository.CommandSender
|
||||
import org.meshtastic.core.repository.MeshActionHandler
|
||||
import org.meshtastic.core.repository.MeshConfigHandler
|
||||
import org.meshtastic.core.repository.MeshConnectionManager
|
||||
import org.meshtastic.core.repository.MeshMessageProcessor
|
||||
import org.meshtastic.core.repository.MeshRouter
|
||||
import org.meshtastic.core.repository.MeshServiceNotifications
|
||||
|
|
@ -67,6 +68,7 @@ class MeshServiceOrchestratorTest {
|
|||
private val takPrefs: TakPrefs = mock(MockMode.autofill)
|
||||
private val cotHandler: CoTHandler = mock(MockMode.autofill)
|
||||
private val databaseManager: DatabaseManager = mock(MockMode.autofill)
|
||||
private val connectionManager: MeshConnectionManager = mock(MockMode.autofill)
|
||||
|
||||
private val testDispatcher = UnconfinedTestDispatcher()
|
||||
private val testScope = CoroutineScope(testDispatcher)
|
||||
|
|
@ -111,6 +113,7 @@ class MeshServiceOrchestratorTest {
|
|||
takMeshIntegration = takMeshIntegration,
|
||||
takPrefs = takPrefs,
|
||||
databaseManager = databaseManager,
|
||||
connectionManager = connectionManager,
|
||||
scope = testScope,
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue