mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Merge pull request #2014 from vector-im/feature/fix_call_sound_device
Fix: Loudspeaker is always used
This commit is contained in:
commit
8157644ff8
@ -15,6 +15,7 @@ Bugfix 🐛:
|
|||||||
- Fix FontSize issue (#1483, #1787)
|
- Fix FontSize issue (#1483, #1787)
|
||||||
- Fix bad color for settings icon on Android < 24 (#1786)
|
- Fix bad color for settings icon on Android < 24 (#1786)
|
||||||
- Change user or room avatar: when selecting Gallery, I'm not proposed to crop the selected image (#1590)
|
- Change user or room avatar: when selecting Gallery, I'm not proposed to crop the selected image (#1590)
|
||||||
|
- Loudspeaker is always used (#1685)
|
||||||
- Fix uploads still don't work with room v6 (#1879)
|
- Fix uploads still don't work with room v6 (#1879)
|
||||||
- Can't handle ongoing call events in background (#1992)
|
- Can't handle ongoing call events in background (#1992)
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ class CallAudioManager(
|
|||||||
} else {
|
} else {
|
||||||
// if a wired headset is plugged, sound will be directed to it
|
// if a wired headset is plugged, sound will be directed to it
|
||||||
// (can't really force earpiece when headset is plugged)
|
// (can't really force earpiece when headset is plugged)
|
||||||
if (isBluetoothHeadsetOn()) {
|
if (isBluetoothHeadsetConnected(audioManager)) {
|
||||||
Timber.v("##VOIP: AudioManager default to WIRELESS_HEADSET ")
|
Timber.v("##VOIP: AudioManager default to WIRELESS_HEADSET ")
|
||||||
setCurrentSoundDevice(SoundDevice.WIRELESS_HEADSET)
|
setCurrentSoundDevice(SoundDevice.WIRELESS_HEADSET)
|
||||||
// try now in case already connected?
|
// try now in case already connected?
|
||||||
@ -246,7 +246,7 @@ class CallAudioManager(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun isHeadsetOn(): Boolean {
|
private fun isHeadsetOn(): Boolean {
|
||||||
return isWiredHeadsetOn() || isBluetoothHeadsetOn()
|
return isWiredHeadsetOn() || (audioManager?.let { isBluetoothHeadsetConnected(it) } ?: false)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun isWiredHeadsetOn(): Boolean {
|
private fun isWiredHeadsetOn(): Boolean {
|
||||||
|
Loading…
Reference in New Issue
Block a user