From 9bc8b401394429981aeb65b8dda57da6821cff04 Mon Sep 17 00:00:00 2001 From: evgeny Date: Wed, 28 Oct 2026 21:12:07 +0100 Subject: [PATCH] Expose call signaling and saved route boundaries to service integration tests --- .../src/main/kotlin/com/utun/chat/RouterHostApp.kt | 6 ++++++ .../kotlin/com/utun/chat/data/RouterHostEnvironment.kt | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/tools/chatgui-android/router-tests/src/main/kotlin/com/utun/chat/RouterHostApp.kt b/tools/chatgui-android/router-tests/src/main/kotlin/com/utun/chat/RouterHostApp.kt index f46eca79e..186b9c3b4 100644 --- a/tools/chatgui-android/router-tests/src/main/kotlin/com/utun/chat/RouterHostApp.kt +++ b/tools/chatgui-android/router-tests/src/main/kotlin/com/utun/chat/RouterHostApp.kt @@ -25,6 +25,12 @@ object R { const val microphone_service_failed = 126; const val overlay_show_failed = 127; const val overlay_active = 128 const val radio_ptt = 129; const val radio_overlay_description = 130; const val radio_active = 131 const val radio_notification = 132; const val overlay_stopped = 133 + const val ongoing_call = 134; const val ongoing_call_description = 135; const val call_talking = 136 + const val call_ringing = 137; const val call_setup = 138; const val call_media_stop_failed = 139 + const val connection_none = 140; const val connection_direct = 141; const val connection_reverse = 142 + const val connection_indirect = 143; const val call_incoming_stop_media = 144; const val call_outgoing_stop_media = 145 + const val call_incoming_stop_radio = 146; const val call_outgoing_stop_radio = 147 + const val call_incoming_stop_stream = 148; const val call_outgoing_stop_stream = 149 const val files_preparing = 201; const val files_transferring = 202; const val files_completed = 203 const val files_cancelled = 204; const val files_failed = 205; const val files_replace_title = 206; const val files_saving = 207 } diff --git a/tools/chatgui-android/router-tests/src/main/kotlin/com/utun/chat/data/RouterHostEnvironment.kt b/tools/chatgui-android/router-tests/src/main/kotlin/com/utun/chat/data/RouterHostEnvironment.kt index 0355db8ed..4471f62be 100644 --- a/tools/chatgui-android/router-tests/src/main/kotlin/com/utun/chat/data/RouterHostEnvironment.kt +++ b/tools/chatgui-android/router-tests/src/main/kotlin/com/utun/chat/data/RouterHostEnvironment.kt @@ -35,6 +35,12 @@ object LogManager { /** Только host-тест: считает уведомления standby, не загружает JNI и не запускает ядро. */ object NativeLib { + val callCommands = mutableListOf>() + fun callStart(channel: String, peer: Long, id: Long) { callCommands.add("start" to id) } + fun callAccept(id: Long) { callCommands.add("accept" to id) } + fun callDecline(id: Long) { callCommands.add("decline" to id) } + fun callHangup(id: Long) { callCommands.add("hangup" to id) } + fun callContinue(id: Long) { callCommands.add("continue" to id) } data class RadioCallCommand(val id: Long, val action: Int, val group: Long, val peer: Long) val radioCalls = mutableListOf() var onRadioCall: (RadioCallCommand) -> Boolean = { true } @@ -161,6 +167,9 @@ object NativeLib { /** Управляемая подготовка конфига: тест удерживает реальный worker, считает перекрытия и затем дожидается его завершения. */ class HostConfigProvider { + var callRoute = AudioRoute.EARPIECE + fun getCallAudioRoute() = callRoute + suspend fun setCallAudioRoute(route: AudioRoute) { callRoute = route } @JvmField var radioOverlay = false var failOverlayWrite = false fun getRadioOverlay() = radioOverlay