From ba9f8406301931b17bf3a13885d688a22c8ae156 Mon Sep 17 00:00:00 2001 From: Mario Danic Date: Tue, 9 Jan 2018 20:08:57 +0100 Subject: [PATCH] Fix far & near sensors Signed-off-by: Mario Danic --- .../main/java/com/nextcloud/talk/activities/CallActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java index 458791385..e3d7c48de 100644 --- a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java +++ b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java @@ -1171,7 +1171,7 @@ public class CallActivity extends AppCompatActivity { .PeerConnectionEventType.SENSOR_NEAR)) { boolean enableVideo = peerConnectionEvent.getPeerConnectionEventType().equals(PeerConnectionEvent .PeerConnectionEventType.SENSOR_FAR) && videoOn; - if (EffortlessPermissions.hasPermissions(this, PERMISSIONS_CAMERA) && inCall) { + if (EffortlessPermissions.hasPermissions(this, PERMISSIONS_CAMERA) && inCall && videoOn) { runOnUiThread(() -> toggleMedia(enableVideo, true)); } } else if (peerConnectionEvent.getPeerConnectionEventType().equals(PeerConnectionEvent