Skip to content

Commit 33dae9c

Browse files
Fixed audio focus not being abandoned on pre-O devices (#837)
1 parent 7f62186 commit 33dae9c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"client-sdk-android": patch
3+
---
4+
5+
Fixed audio focus not being abandoned on pre-O devices due to mismatched listener instance.

livekit-android-sdk/src/main/java/io/livekit/android/audio/AudioFocusHandler.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 LiveKit, Inc.
2+
* Copyright 2023-2025 LiveKit, Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -97,7 +97,7 @@ constructor(context: Context) : AudioHandler {
9797
audioRequest = null
9898
} else {
9999
@Suppress("DEPRECATION")
100-
audioManager.abandonAudioFocus(onAudioFocusChangeListener)
100+
audioManager.abandonAudioFocus(audioFocusListener)
101101
}
102102
}
103103

0 commit comments

Comments
 (0)