Fix wrong conditions

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2018-01-03 13:06:16 +01:00
parent 7da475f8cc
commit 42d9b07c4e

View file

@ -231,10 +231,12 @@ public class CallActivity extends AppCompatActivity {
networkBroadcastReceier = new BroadcastReceiver() { networkBroadcastReceier = new BroadcastReceiver() {
@Override @Override
public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) {
if (!Device.getNetworkType(context).equals(JobRequest.NetworkType.ANY) && !leavingCall) { if (!Device.getNetworkType(context).equals(JobRequest.NetworkType.ANY)) {
startPullingSignalingMessages(true); if (!leavingCall) {
} else if (Device.getNetworkType(context).equals(JobRequest.NetworkType.ANY) && leavingCall) { startPullingSignalingMessages(true);
hangup(true); } else {
hangup(true);
}
} }
} }
}; };