Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2019-09-05 12:03:21 +02:00
parent 4697e4f340
commit 69c4435b1e

View File

@ -878,7 +878,9 @@ public class CallController extends BaseController {
@Override
public void onDestroy() {
if (!currentCallStatus.equals(CallStatus.LEAVING)) {
onHangupClick();
}
powerManagerUtils.updatePhoneState(PowerManagerUtils.PhoneState.IDLE);
super.onDestroy();
}
@ -1074,6 +1076,7 @@ public class CallController extends BaseController {
@Override
public void onNext(GenericOverall genericOverall) {
if (!currentCallStatus.equals(CallStatus.LEAVING)) {
setCallState(CallStatus.ESTABLISHED);
ApplicationWideCurrentRoomHolder.getInstance().setInCall(true);
@ -1161,6 +1164,7 @@ public class CallController extends BaseController {
}
}
}
@Override
public void onError(Throwable e) {
@ -1331,6 +1335,7 @@ public class CallController extends BaseController {
private void hangup(boolean shutDownView) {
stopCallingSound();
dispose(null);
if (shutDownView) {
if (videoCapturer != null) {
@ -2261,20 +2266,20 @@ public class CallController extends BaseController {
handler.removeCallbacksAndMessages(null);
}
if (!hasMCU) {
/*if (!hasMCU) {
setCallState(CallStatus.RECONNECTING);
hangupNetworkCalls(false);
}
}*/
} else if (networkEvent.getNetworkConnectionEvent().equals(NetworkEvent.NetworkConnectionEvent.NETWORK_DISCONNECTED)) {
if (handler != null) {
handler.removeCallbacksAndMessages(null);
}
if (!hasMCU) {
/* if (!hasMCU) {
setCallState(CallStatus.OFFLINE);
hangup(false);
}
}*/
}
}
}