diff --git a/core/network/src/androidMain/kotlin/org/meshtastic/core/network/radio/BleRadioInterface.kt b/core/network/src/androidMain/kotlin/org/meshtastic/core/network/radio/BleRadioInterface.kt
index 46b6aa349..af4b9f320 100644
--- a/core/network/src/androidMain/kotlin/org/meshtastic/core/network/radio/BleRadioInterface.kt
+++ b/core/network/src/androidMain/kotlin/org/meshtastic/core/network/radio/BleRadioInterface.kt
@@ -14,6 +14,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+@file:Suppress("TooManyFunctions", "TooGenericExceptionCaught")
+
package org.meshtastic.core.network.radio
import android.annotation.SuppressLint
diff --git a/core/network/src/androidMain/kotlin/org/meshtastic/core/network/repository/NsdManager.kt b/core/network/src/androidMain/kotlin/org/meshtastic/core/network/repository/NsdManager.kt
index ab3926510..ce272bf59 100644
--- a/core/network/src/androidMain/kotlin/org/meshtastic/core/network/repository/NsdManager.kt
+++ b/core/network/src/androidMain/kotlin/org/meshtastic/core/network/repository/NsdManager.kt
@@ -14,6 +14,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+@file:Suppress("SwallowedException")
+
package org.meshtastic.core.network.repository
import android.annotation.SuppressLint
diff --git a/core/network/src/androidMain/kotlin/org/meshtastic/core/network/repository/ProbeTableProvider.kt b/core/network/src/androidMain/kotlin/org/meshtastic/core/network/repository/ProbeTableProvider.kt
index 433d96de5..15558118e 100644
--- a/core/network/src/androidMain/kotlin/org/meshtastic/core/network/repository/ProbeTableProvider.kt
+++ b/core/network/src/androidMain/kotlin/org/meshtastic/core/network/repository/ProbeTableProvider.kt
@@ -14,6 +14,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+@file:Suppress("MagicNumber")
+
package org.meshtastic.core.network.repository
import com.hoho.android.usbserial.driver.CdcAcmSerialDriver
diff --git a/core/network/src/androidMain/kotlin/org/meshtastic/core/network/repository/SerialConnectionImpl.kt b/core/network/src/androidMain/kotlin/org/meshtastic/core/network/repository/SerialConnectionImpl.kt
index e2d787920..b2ccf6545 100644
--- a/core/network/src/androidMain/kotlin/org/meshtastic/core/network/repository/SerialConnectionImpl.kt
+++ b/core/network/src/androidMain/kotlin/org/meshtastic/core/network/repository/SerialConnectionImpl.kt
@@ -14,6 +14,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+@file:Suppress("MagicNumber")
+
package org.meshtastic.core.network.repository
import android.hardware.usb.UsbManager
diff --git a/core/service/src/androidMain/kotlin/org/meshtastic/core/service/MeshService.kt b/core/service/src/androidMain/kotlin/org/meshtastic/core/service/MeshService.kt
index 675ed0413..c87abb1df 100644
--- a/core/service/src/androidMain/kotlin/org/meshtastic/core/service/MeshService.kt
+++ b/core/service/src/androidMain/kotlin/org/meshtastic/core/service/MeshService.kt
@@ -27,12 +27,8 @@ import co.touchlab.kermit.Logger
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
-import kotlinx.coroutines.flow.launchIn
-import kotlinx.coroutines.flow.onEach
import org.koin.android.ext.android.inject
-
import org.meshtastic.core.common.hasLocationPermission
-import org.meshtastic.core.common.util.handledLaunch
import org.meshtastic.core.common.util.toRemoteExceptions
import org.meshtastic.core.model.DataPacket
import org.meshtastic.core.model.DeviceVersion
@@ -43,18 +39,12 @@ import org.meshtastic.core.model.Position
import org.meshtastic.core.model.RadioNotConnectedException
import org.meshtastic.core.repository.CommandSender
import org.meshtastic.core.repository.MeshConnectionManager
-import org.meshtastic.core.repository.MeshLocationManager
-import org.meshtastic.core.repository.MeshMessageProcessor
import org.meshtastic.core.repository.MeshRouter
-import org.meshtastic.core.repository.MeshServiceNotifications
import org.meshtastic.core.repository.NodeManager
-import org.meshtastic.core.repository.PacketHandler
import org.meshtastic.core.repository.RadioInterfaceService
import org.meshtastic.core.repository.SERVICE_NOTIFY_ID
import org.meshtastic.core.repository.ServiceBroadcasts
import org.meshtastic.core.repository.ServiceRepository
-import org.meshtastic.core.service.IMeshService
-
import org.meshtastic.proto.PortNum
@Suppress("TooManyFunctions", "LargeClass")
@@ -64,14 +54,10 @@ class MeshService : Service() {
private val serviceRepository: ServiceRepository by inject()
- private val packetHandler: PacketHandler by inject()
-
private val serviceBroadcasts: ServiceBroadcasts by inject()
private val nodeManager: NodeManager by inject()
- private val messageProcessor: MeshMessageProcessor by inject()
-
private val commandSender: CommandSender by inject()
private val locationManager: MeshLocationManager by inject()
diff --git a/core/service/src/commonTest/kotlin/org/meshtastic/core/service/MeshServiceOrchestratorTest.kt b/core/service/src/commonTest/kotlin/org/meshtastic/core/service/MeshServiceOrchestratorTest.kt
index b8f174271..3afc27cd5 100644
--- a/core/service/src/commonTest/kotlin/org/meshtastic/core/service/MeshServiceOrchestratorTest.kt
+++ b/core/service/src/commonTest/kotlin/org/meshtastic/core/service/MeshServiceOrchestratorTest.kt
@@ -1,13 +1,37 @@
+/*
+ * Copyright (c) 2026 Meshtastic LLC
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
package org.meshtastic.core.service
import io.mockk.every
import io.mockk.mockk
import io.mockk.verify
import kotlinx.coroutines.flow.MutableSharedFlow
+import org.meshtastic.core.repository.CommandSender
+import org.meshtastic.core.repository.MeshConnectionManager
+import org.meshtastic.core.repository.MeshMessageProcessor
+import org.meshtastic.core.repository.MeshRouter
+import org.meshtastic.core.repository.MeshServiceNotifications
+import org.meshtastic.core.repository.NodeManager
+import org.meshtastic.core.repository.PacketHandler
+import org.meshtastic.core.repository.RadioInterfaceService
+import org.meshtastic.core.repository.ServiceRepository
import kotlin.test.Test
import kotlin.test.assertFalse
import kotlin.test.assertTrue
-import org.meshtastic.core.repository.*
class MeshServiceOrchestratorTest {
@@ -22,30 +46,31 @@ class MeshServiceOrchestratorTest {
val connectionManager = mockk(relaxed = true)
val router = mockk(relaxed = true)
val serviceNotifications = mockk(relaxed = true)
-
+
every { radioInterfaceService.receivedData } returns MutableSharedFlow()
every { serviceRepository.serviceAction } returns MutableSharedFlow()
- val orchestrator = MeshServiceOrchestrator(
- radioInterfaceService,
- serviceRepository,
- packetHandler,
- nodeManager,
- messageProcessor,
- commandSender,
- connectionManager,
- router,
- serviceNotifications
- )
+ val orchestrator =
+ MeshServiceOrchestrator(
+ radioInterfaceService,
+ serviceRepository,
+ packetHandler,
+ nodeManager,
+ messageProcessor,
+ commandSender,
+ connectionManager,
+ router,
+ serviceNotifications,
+ )
assertFalse(orchestrator.isRunning)
orchestrator.start()
assertTrue(orchestrator.isRunning)
-
+
verify { serviceNotifications.initChannels() }
verify { packetHandler.start(any()) }
verify { nodeManager.loadCachedNodeDB() }
-
+
orchestrator.stop()
assertFalse(orchestrator.isRunning)
}