fix(android): expose voice diagnostics safely
This commit is contained in:
@@ -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]"),
|
||||
|
||||
Reference in New Issue
Block a user