2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-31 14:15:14 +00:00

Make NetworkPacketWithCallback a data class as per code review

This commit is contained in:
Albert Vaca Cintora
2024-06-04 20:21:20 +02:00
parent f03c86c4ae
commit 1195cf5c4e

View File

@@ -48,6 +48,9 @@ import java.util.concurrent.ConcurrentMap
import java.util.concurrent.CopyOnWriteArrayList
class Device : PacketReceiver {
data class NetworkPacketWithCallback(val np : NetworkPacket, val callback: SendPacketStatusCallback)
val context: Context
@VisibleForTesting
val deviceInfo: DeviceInfo
@@ -70,7 +73,7 @@ class Device : PacketReceiver {
private var pluginsByIncomingInterface: MultiValuedMap<String, String> = ArrayListValuedHashMap()
private val settings: SharedPreferences
private val pluginsChangedListeners: MutableList<PluginsChangedListener> = CopyOnWriteArrayList()
class NetworkPacketWithCallback(val np : NetworkPacket, val callback: SendPacketStatusCallback)
private val sendChannel = Channel<NetworkPacketWithCallback>(Channel.UNLIMITED)
private var sendCoroutine : Job? = null