mirror of
https://github.com/nextcloud/talk-android
synced 2025-02-03 05:03:04 +00:00
Enforce leaving state when shutting down the activity
When the view is shutting down the call is always left, so the status should be accordingly set. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
53e3543839
commit
f94db44b4d
@ -396,7 +396,6 @@ public class CallActivity extends CallBaseActivity {
|
||||
binding.cameraButton.setOnClickListener(l -> onCameraClick());
|
||||
|
||||
binding.hangupButton.setOnClickListener(l -> {
|
||||
setCallState(CallStatus.LEAVING);
|
||||
hangup(true);
|
||||
});
|
||||
|
||||
@ -1167,7 +1166,6 @@ public class CallActivity extends CallBaseActivity {
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if (!currentCallStatus.equals(CallStatus.LEAVING)) {
|
||||
setCallState(CallStatus.LEAVING);
|
||||
hangup(true);
|
||||
}
|
||||
powerManagerUtils.updatePhoneState(PowerManagerUtils.PhoneState.IDLE);
|
||||
@ -1660,6 +1658,9 @@ public class CallActivity extends CallBaseActivity {
|
||||
|
||||
private void hangup(boolean shutDownView) {
|
||||
Log.d(TAG, "hangup! shutDownView=" + shutDownView);
|
||||
if (shutDownView) {
|
||||
setCallState(CallStatus.LEAVING);
|
||||
}
|
||||
stopCallingSound();
|
||||
dispose(null);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user