Expose call signaling and saved route boundaries to service integration tests

This commit is contained in:
evgeny committed 2026-10-29 13:34:23 +01:00
1 parent 752642d63e
commit 9bc8b40139
2 files changed
+15

No files matched your search

@@ -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
}
@@ -35,6 +35,12 @@ object LogManager {
/** Только host-тест: считает уведомления standby, не загружает JNI и не запускает ядро. */
object NativeLib {
val callCommands = mutableListOf<Pair<String, Long>>()
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<RadioCallCommand>()
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