From 42d9b07c4e59c2206ac8f8f31a3840053437d4d8 Mon Sep 17 00:00:00 2001 From: Mario Danic Date: Wed, 3 Jan 2018 13:06:16 +0100 Subject: [PATCH] Fix wrong conditions Signed-off-by: Mario Danic --- .../com/nextcloud/talk/activities/CallActivity.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 5e7c10416..9113e6ecb 100644 --- a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java +++ b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java @@ -231,10 +231,12 @@ public class CallActivity extends AppCompatActivity { networkBroadcastReceier = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { - if (!Device.getNetworkType(context).equals(JobRequest.NetworkType.ANY) && !leavingCall) { - startPullingSignalingMessages(true); - } else if (Device.getNetworkType(context).equals(JobRequest.NetworkType.ANY) && leavingCall) { - hangup(true); + if (!Device.getNetworkType(context).equals(JobRequest.NetworkType.ANY)) { + if (!leavingCall) { + startPullingSignalingMessages(true); + } else { + hangup(true); + } } } };