fix(android): remove legacy connected event_cb; add preflight_start debug step
The legacy event_cb("connected") call between handshake and audio
preflight was a no-op on the frontend (it enters voice only after the
command resolves) but added noise to failing traces. Replaced with a
connect:connected_event_skipped debug event and added an explicit
connect:android_audio_preflight_start marker so the debug log shows a
clear boundary between handshake completion and audio startup.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -591,12 +591,25 @@ impl CallEngine {
|
|||||||
"first-join diag: direct P2P — skipping relay handshake (QUIC TLS is the encryption layer)"
|
"first-join diag: direct P2P — skipping relay handshake (QUIC TLS is the encryption layer)"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
event_cb("connected", &format!("joined room {room}"));
|
// Do not emit the legacy "connected" call-event here. The frontend
|
||||||
|
// ignores it and enters voice only after the command resolves; on
|
||||||
|
// Android this synchronous emit was the only operation between
|
||||||
|
// handshake_done and audio preflight in failing traces.
|
||||||
|
crate::emit_call_debug(
|
||||||
|
&app,
|
||||||
|
"connect:connected_event_skipped",
|
||||||
|
serde_json::json!({ "t_ms": call_t0.elapsed().as_millis() }),
|
||||||
|
);
|
||||||
|
|
||||||
// Oboe audio via the wzp-native cdylib that was dlopen'd at
|
// Oboe audio via the wzp-native cdylib that was dlopen'd at
|
||||||
// startup. `wzp_native::audio_start()` brings up the capture +
|
// startup. `wzp_native::audio_start()` brings up the capture +
|
||||||
// playout streams; send/recv tasks below pull/push PCM through
|
// playout streams; send/recv tasks below pull/push PCM through
|
||||||
// the extern "C" bridge rings.
|
// the extern "C" bridge rings.
|
||||||
|
crate::emit_call_debug(
|
||||||
|
&app,
|
||||||
|
"connect:android_audio_preflight_start",
|
||||||
|
serde_json::json!({ "t_ms": call_t0.elapsed().as_millis() }),
|
||||||
|
);
|
||||||
let native_loaded = crate::wzp_native::is_loaded();
|
let native_loaded = crate::wzp_native::is_loaded();
|
||||||
crate::emit_call_debug(
|
crate::emit_call_debug(
|
||||||
&app,
|
&app,
|
||||||
|
|||||||
Reference in New Issue
Block a user