fixed crash after accepting voice calls on devices that don’t have an earpiece (tablets)
fixes #3682
This commit is contained in:
parent
63ddd97b6b
commit
abb33b048a
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue