From 13074d973f7a54bec1db02d5da7ea01f0173d3b1 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 2 May 2017 15:14:04 +0200 Subject: [PATCH] fix crashes around ErrorInfo java object --- src/android/org/linphone/CallOutgoingActivity.java | 13 +++++++++---- submodules/linphone | 2 +- submodules/mediastreamer2 | 2 +- submodules/oRTP | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/android/org/linphone/CallOutgoingActivity.java b/src/android/org/linphone/CallOutgoingActivity.java index f72e9d5f2..2b100df29 100644 --- a/src/android/org/linphone/CallOutgoingActivity.java +++ b/src/android/org/linphone/CallOutgoingActivity.java @@ -104,17 +104,22 @@ public class CallOutgoingActivity extends LinphoneGenericActivity implements OnC return; } else if (state == State.Error) { // Convert LinphoneCore message for internalization - if (message != null && call.getErrorInfo().getReason() == Reason.Declined) { + if (call.getErrorInfo().getReason() == Reason.Declined) { displayCustomToast(getString(R.string.error_call_declined), Toast.LENGTH_SHORT); - } else if (message != null && call.getErrorInfo().getReason() == Reason.NotFound) { + } else if (call.getErrorInfo().getReason() == Reason.NotFound) { displayCustomToast(getString(R.string.error_user_not_found), Toast.LENGTH_SHORT); - } else if (message != null && call.getErrorInfo().getReason() == Reason.Media) { + } else if (call.getErrorInfo().getReason() == Reason.Media) { displayCustomToast(getString(R.string.error_incompatible_media), Toast.LENGTH_SHORT); - } else if (message != null && call.getErrorInfo().getReason() == Reason.Busy) { + } else if (call.getErrorInfo().getReason() == Reason.Busy) { displayCustomToast(getString(R.string.error_user_busy), Toast.LENGTH_SHORT); } else if (message != null) { displayCustomToast(getString(R.string.error_unknown) + " - " + message, Toast.LENGTH_SHORT); } + }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); + } } if (LinphoneManager.getLc().getCallsNb() == 0) { diff --git a/submodules/linphone b/submodules/linphone index 68f5085d8..5cde30dae 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 68f5085d8426b4c572e9f538bedbbc87b49bc36a +Subproject commit 5cde30dae7c034cb2f2fba0a367f16018e48de1e diff --git a/submodules/mediastreamer2 b/submodules/mediastreamer2 index d09e51ffe..399a95036 160000 --- a/submodules/mediastreamer2 +++ b/submodules/mediastreamer2 @@ -1 +1 @@ -Subproject commit d09e51ffeeab695f287ea838838b5da5df42cb40 +Subproject commit 399a95036ef98862ced4af9df92c72ad1d8b6b8d diff --git a/submodules/oRTP b/submodules/oRTP index 9759554cd..f805b5c46 160000 --- a/submodules/oRTP +++ b/submodules/oRTP @@ -1 +1 @@ -Subproject commit 9759554cd788dc8254086b6a63b4cc74609b8535 +Subproject commit f805b5c465742d7895a9c9de03197e7216337bed