mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-27 15:39:47 +01:00
Remove no longer needed condition
Now that the event is posted only for proximity sensor changes the condition is no longer needed. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
5d7b5160b7
commit
4516de4add
@ -2125,19 +2125,13 @@ public class CallActivity extends CallBaseActivity {
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onMessageEvent(ProximitySensorEvent proximitySensorEvent) {
|
||||
if (proximitySensorEvent.getProximitySensorEventType() ==
|
||||
ProximitySensorEvent.ProximitySensorEventType.SENSOR_FAR ||
|
||||
proximitySensorEvent.getProximitySensorEventType() ==
|
||||
ProximitySensorEvent.ProximitySensorEventType.SENSOR_NEAR) {
|
||||
|
||||
if (!isVoiceOnlyCall) {
|
||||
boolean enableVideo = proximitySensorEvent.getProximitySensorEventType() ==
|
||||
ProximitySensorEvent.ProximitySensorEventType.SENSOR_FAR && videoOn;
|
||||
if (EffortlessPermissions.hasPermissions(this, PERMISSIONS_CAMERA) &&
|
||||
(currentCallStatus == CallStatus.CONNECTING || isConnectionEstablished()) && videoOn
|
||||
&& enableVideo != localVideoTrack.enabled()) {
|
||||
toggleMedia(enableVideo, true);
|
||||
}
|
||||
if (!isVoiceOnlyCall) {
|
||||
boolean enableVideo = proximitySensorEvent.getProximitySensorEventType() ==
|
||||
ProximitySensorEvent.ProximitySensorEventType.SENSOR_FAR && videoOn;
|
||||
if (EffortlessPermissions.hasPermissions(this, PERMISSIONS_CAMERA) &&
|
||||
(currentCallStatus == CallStatus.CONNECTING || isConnectionEstablished()) && videoOn
|
||||
&& enableVideo != localVideoTrack.enabled()) {
|
||||
toggleMedia(enableVideo, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user