fix(android): expose voice diagnostics safely

This commit is contained in:
Edison Jwa
2026-05-20 14:52:33 +09:00
parent d6763787aa
commit 26b06ce786
3 changed files with 16 additions and 20 deletions
+6 -10
View File
@@ -907,12 +907,9 @@ mod tests {
let redactor = Redactor::with_secrets(secrets);
let sink = InMemoryLogSink::new(16, redactor);
let yaml = "achieved:\n performance_mode: LowLatency\n sample_rate_hz: 48000\n";
let exported = DiagnosticExport::from_sink(
&sink,
vec![("build".into(), "test".into())],
)
.unwrap()
.with_android_audio(Some(yaml.to_string()));
let exported = DiagnosticExport::from_sink(&sink, vec![("build".into(), "test".into())])
.unwrap()
.with_android_audio(Some(yaml.to_string()));
let text = exported.to_text();
let metadata_pos = text.find("[metadata]").expect("metadata section");
@@ -958,10 +955,9 @@ mod tests {
);
// Explicit None — idempotent with default.
let exported_explicit =
DiagnosticExport::from_sink(&sink, vec![("k".into(), "v".into())])
.unwrap()
.with_android_audio(None);
let exported_explicit = DiagnosticExport::from_sink(&sink, vec![("k".into(), "v".into())])
.unwrap()
.with_android_audio(None);
let text_explicit = exported_explicit.to_text();
assert!(
!text_explicit.contains("[audio.android]"),