From abb33b048a5f1b59ae9357c11061ace6271fb18c Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 2 May 2020 18:06:53 +0200 Subject: [PATCH] =?UTF-8?q?fixed=20crash=20after=20accepting=20voice=20cal?= =?UTF-8?q?ls=20on=20devices=20that=20don=E2=80=99t=20have=20an=20earpiece?= =?UTF-8?q?=20(tablets)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes #3682 --- .../eu/siacs/conversations/services/AppRTCAudioManager.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/services/AppRTCAudioManager.java b/src/main/java/eu/siacs/conversations/services/AppRTCAudioManager.java index cd8a19820..c65f6a17b 100644 --- a/src/main/java/eu/siacs/conversations/services/AppRTCAudioManager.java +++ b/src/main/java/eu/siacs/conversations/services/AppRTCAudioManager.java @@ -92,9 +92,8 @@ public class AppRTCAudioManager { bluetoothManager = AppRTCBluetoothManager.create(context, this); wiredHeadsetReceiver = new WiredHeadsetReceiver(); amState = AudioManagerState.UNINITIALIZED; - Log.d(Config.LOGTAG, "speaker phone preference: " + speakerPhonePreference); this.speakerPhonePreference = speakerPhonePreference; - if (speakerPhonePreference == SpeakerPhonePreference.EARPIECE) { + if (speakerPhonePreference == SpeakerPhonePreference.EARPIECE && hasEarpiece()) { defaultAudioDevice = AudioDevice.EARPIECE; } else { defaultAudioDevice = AudioDevice.SPEAKER_PHONE;