mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-05-12 08:42:01 -04:00
refactor: delete dead broadcast Constants.kt and unused actionReceived
Constants.kt re-exported MeshtasticIntent constants for the deleted ServiceBroadcasts system. No consumers remain after broadcast removal. Also remove MeshService.actionReceived() companion method (no callers). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.meshtastic.core.service
|
||||
|
||||
import org.meshtastic.core.api.MeshtasticIntent
|
||||
|
||||
const val PREFIX = "com.geeksville.mesh"
|
||||
|
||||
const val ACTION_NODE_CHANGE = MeshtasticIntent.ACTION_NODE_CHANGE
|
||||
const val ACTION_MESH_CONNECTED = MeshtasticIntent.ACTION_MESH_CONNECTED
|
||||
const val ACTION_MESH_DISCONNECTED = MeshtasticIntent.ACTION_MESH_DISCONNECTED
|
||||
|
||||
const val ACTION_CONNECTION_CHANGED = MeshtasticIntent.ACTION_CONNECTION_CHANGED
|
||||
const val ACTION_MESSAGE_STATUS = MeshtasticIntent.ACTION_MESSAGE_STATUS
|
||||
|
||||
fun actionReceived(portNum: String) = "$PREFIX.RECEIVED.$portNum"
|
||||
|
||||
// Standard EXTRA bundle definitions
|
||||
const val EXTRA_CONNECTED = MeshtasticIntent.EXTRA_CONNECTED
|
||||
|
||||
const val EXTRA_PAYLOAD = MeshtasticIntent.EXTRA_PAYLOAD
|
||||
const val EXTRA_NODEINFO = MeshtasticIntent.EXTRA_NODEINFO
|
||||
const val EXTRA_PACKET_ID = MeshtasticIntent.EXTRA_PACKET_ID
|
||||
const val EXTRA_STATUS = MeshtasticIntent.EXTRA_STATUS
|
||||
@@ -34,7 +34,6 @@ import org.meshtastic.core.repository.MeshServiceNotifications
|
||||
import org.meshtastic.core.repository.RadioPrefs
|
||||
import org.meshtastic.core.repository.SERVICE_NOTIFY_ID
|
||||
import org.meshtastic.core.repository.ServiceRepository
|
||||
import org.meshtastic.proto.PortNum
|
||||
|
||||
/**
|
||||
* Android foreground service that hosts the Meshtastic mesh radio connection.
|
||||
@@ -67,12 +66,6 @@ class MeshService : Service() {
|
||||
private var isServiceInitialized = false
|
||||
|
||||
companion object {
|
||||
fun actionReceived(portNum: Int): String {
|
||||
val portType = PortNum.fromValue(portNum)
|
||||
val portStr = portType?.toString() ?: portNum.toString()
|
||||
return actionReceived(portStr)
|
||||
}
|
||||
|
||||
fun createIntent(context: Context) = Intent(context, MeshService::class.java)
|
||||
|
||||
val minDeviceVersion = DeviceVersion(DeviceVersion.MIN_FW_VERSION)
|
||||
|
||||
Reference in New Issue
Block a user