mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-25 22:59:25 +00:00
Disable proximity lock when local video is enabled
Fixes #6179 // FREEBIE
This commit is contained in:
@@ -491,7 +491,9 @@ public class WebRtcCallService extends Service implements InjectableType, PeerCo
|
||||
|
||||
initializeAudio();
|
||||
outgoingRinger.playComplete();
|
||||
lockManager.updatePhoneState(LockManager.PhoneState.IN_CALL);
|
||||
|
||||
if (localVideoEnabled) lockManager.updatePhoneState(LockManager.PhoneState.IN_VIDEO);
|
||||
else lockManager.updatePhoneState(LockManager.PhoneState.IN_CALL);
|
||||
|
||||
sendMessage(WebRtcViewModel.State.CALL_CONNECTED, recipient, localVideoEnabled, remoteVideoEnabled);
|
||||
|
||||
@@ -664,6 +666,11 @@ public class WebRtcCallService extends Service implements InjectableType, PeerCo
|
||||
.build().toByteArray()), false));
|
||||
}
|
||||
|
||||
if (callState == CallState.STATE_CONNECTED) {
|
||||
if (localVideoEnabled) this.lockManager.updatePhoneState(LockManager.PhoneState.IN_VIDEO);
|
||||
else this.lockManager.updatePhoneState(LockManager.PhoneState.IN_CALL);
|
||||
}
|
||||
|
||||
sendMessage(viewModelStateFor(callState), this.recipient, localVideoEnabled, remoteVideoEnabled);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user