Skip to content

Commit 24c196a

Browse files
committed
fix(android): disable AudioSwitch audio focus to fix stuck volume controls after call
Telecom (callkeep) already manages audio focus for self-managed VoIP calls. AudioSwitch holding a concurrent permanent AUDIOFOCUS_GAIN kept Android in call audio mode after the call ended on older MIUI devices, causing volume buttons to control call volume instead of media volume. Disabling manageAudioFocus prevents AudioSwitch from requesting focus while leaving device routing (earpiece/speaker/bluetooth) intact. Fixes WT-1429
1 parent 90f4a63 commit 24c196a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

lib/features/call/utils/call_media_manager.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ class CallMediaManager {
4747
void _configure() {
4848
if (Platform.isAndroid) {
4949
AndroidNativeAudioManagement.setAndroidAudioConfiguration(
50-
AndroidAudioConfiguration(preferredOutputOrder: _voiceCallOutputOrder),
50+
AndroidAudioConfiguration(
51+
preferredOutputOrder: _voiceCallOutputOrder,
52+
// Telecom owns audio focus; dual ownership leaves volume stuck in call mode on older MIUI (WT-1429).
53+
manageAudioFocus: false,
54+
),
5155
);
5256
}
5357
if (Platform.isIOS) AppleNativeAudioManagement.setUseManualAudio(true);

0 commit comments

Comments
 (0)