feat(voice): harden Android audio and channel joins

This commit is contained in:
Edison Jwa
2026-05-19 01:58:07 +09:00
parent 29a553d4e1
commit 8c253f1d4d
23 changed files with 2948 additions and 363 deletions
@@ -321,7 +321,8 @@ pub enum SharingModeChoice {
/// Returns the next sharing-mode to try (SDD-112 item 7,
/// SWE4-UV-049). Ladder: Exclusive -> Shared -> exhausted.
pub fn next_sharing_mode_after(attempted: &[SharingModeChoice]) -> Option<SharingModeChoice> {
const LADDER: [SharingModeChoice; 2] = [SharingModeChoice::Exclusive, SharingModeChoice::Shared];
const LADDER: [SharingModeChoice; 2] =
[SharingModeChoice::Exclusive, SharingModeChoice::Shared];
LADDER.iter().copied().find(|m| !attempted.contains(m))
}
@@ -746,8 +747,14 @@ mod tests {
/// on these tokens).
#[test]
fn swe4_uv_047_achieved_enum_display_is_stable() {
assert_eq!(format!("{}", AchievedPerformanceMode::LowLatency), "LowLatency");
assert_eq!(format!("{}", AchievedPerformanceMode::PowerSaving), "PowerSaving");
assert_eq!(
format!("{}", AchievedPerformanceMode::LowLatency),
"LowLatency"
);
assert_eq!(
format!("{}", AchievedPerformanceMode::PowerSaving),
"PowerSaving"
);
assert_eq!(format!("{}", AchievedPerformanceMode::None), "None");
assert_eq!(format!("{}", AchievedSharingMode::Exclusive), "Exclusive");
assert_eq!(format!("{}", AchievedSharingMode::Shared), "Shared");