From c058db7ff755a57d8dda7eb1abc9fdc5e76fdd19 Mon Sep 17 00:00:00 2001 From: Erwan Croze Date: Wed, 19 Jul 2017 16:37:32 +0200 Subject: [PATCH] Fix UI on outgoing call view -If an call is active and we call an other contact and he decline, view wasn't finish --- src/android/org/linphone/CallOutgoingActivity.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/android/org/linphone/CallOutgoingActivity.java b/src/android/org/linphone/CallOutgoingActivity.java index 2b100df29..87a2ce203 100644 --- a/src/android/org/linphone/CallOutgoingActivity.java +++ b/src/android/org/linphone/CallOutgoingActivity.java @@ -106,19 +106,25 @@ public class CallOutgoingActivity extends LinphoneGenericActivity implements OnC // Convert LinphoneCore message for internalization if (call.getErrorInfo().getReason() == Reason.Declined) { displayCustomToast(getString(R.string.error_call_declined), Toast.LENGTH_SHORT); + decline(); } else if (call.getErrorInfo().getReason() == Reason.NotFound) { displayCustomToast(getString(R.string.error_user_not_found), Toast.LENGTH_SHORT); + decline(); } else if (call.getErrorInfo().getReason() == Reason.Media) { displayCustomToast(getString(R.string.error_incompatible_media), Toast.LENGTH_SHORT); + decline(); } else if (call.getErrorInfo().getReason() == Reason.Busy) { displayCustomToast(getString(R.string.error_user_busy), Toast.LENGTH_SHORT); + decline(); } else if (message != null) { displayCustomToast(getString(R.string.error_unknown) + " - " + message, Toast.LENGTH_SHORT); + decline(); } }else if (state == State.CallEnd) { // Convert LinphoneCore message for internalization if (call.getErrorInfo().getReason() == Reason.Declined) { displayCustomToast(getString(R.string.error_call_declined), Toast.LENGTH_SHORT); + decline(); } }