Fix far & near sensors

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2018-01-09 20:08:57 +01:00
parent 13a22f0a46
commit ba9f840630

View File

@ -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