feat(voice): harden Android audio and channel joins
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user