mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Enable proximity sensor for outgoing calls if video is disabled
This commit is contained in:
parent
eea978d8e8
commit
6d099a3075
1 changed files with 4 additions and 1 deletions
|
|
@ -411,8 +411,11 @@ class CurrentCallViewModel @UiThread constructor() : GenericViewModel() {
|
|||
private fun updateProximitySensor() {
|
||||
if (::currentCall.isInitialized) {
|
||||
val callState = currentCall.state
|
||||
if (LinphoneUtils.isCallIncoming(callState) || LinphoneUtils.isCallOutgoing(callState)) {
|
||||
if (LinphoneUtils.isCallIncoming(callState)) {
|
||||
proximitySensorEnabled.postValue(false)
|
||||
} else if (LinphoneUtils.isCallOutgoing(callState)) {
|
||||
val videoEnabled = currentCall.params.isVideoEnabled
|
||||
proximitySensorEnabled.postValue(!videoEnabled)
|
||||
} else {
|
||||
if (isSendingVideo.value == true || isReceivingVideo.value == true) {
|
||||
proximitySensorEnabled.postValue(false)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue