Don't enable speakerphone when video enabled if headset on

Fixes #6431
// FREEBIE
This commit is contained in:
Moxie Marlinspike 2017-03-24 11:11:48 -07:00
parent 3dfc72dad0
commit c69efbffd2

View File

@ -748,7 +748,11 @@ public class WebRtcCallService extends Service implements InjectableType, PeerCo
else this.lockManager.updatePhoneState(LockManager.PhoneState.IN_CALL);
}
if (localVideoEnabled && !audioManager.isSpeakerphoneOn() && !audioManager.isBluetoothScoOn()) {
if (localVideoEnabled &&
!audioManager.isSpeakerphoneOn() &&
!audioManager.isBluetoothScoOn() &&
!audioManager.isWiredHeadsetOn())
{
audioManager.setSpeakerphoneOn(true);
}