Fix sensors stuff

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2018-01-08 23:21:41 +01:00
parent ad53b961b7
commit 6671da9590

View File

@ -1171,8 +1171,7 @@ public class CallActivity extends AppCompatActivity {
.PeerConnectionEventType.SENSOR_NEAR)) { .PeerConnectionEventType.SENSOR_NEAR)) {
boolean enableVideo = peerConnectionEvent.getPeerConnectionEventType().equals(PeerConnectionEvent boolean enableVideo = peerConnectionEvent.getPeerConnectionEventType().equals(PeerConnectionEvent
.PeerConnectionEventType.SENSOR_FAR) && videoOn; .PeerConnectionEventType.SENSOR_FAR) && videoOn;
if (EffortlessPermissions.hasPermissions(this, PERMISSIONS_CAMERA) && inCall && if (EffortlessPermissions.hasPermissions(this, PERMISSIONS_CAMERA) && inCall) {
enableVideo != videoOn) {
runOnUiThread(() -> toggleMedia(enableVideo, true)); runOnUiThread(() -> toggleMedia(enableVideo, true));
} }
} else if (peerConnectionEvent.getPeerConnectionEventType().equals(PeerConnectionEvent } else if (peerConnectionEvent.getPeerConnectionEventType().equals(PeerConnectionEvent