From c87b923685c951bfa27ba2364bd33a3d89ff0932 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 9 Nov 2011 18:22:09 +0100 Subject: [PATCH] fix crash in case of call faillure (not the good thread to display things) --- src/org/linphone/LinphoneActivity.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/org/linphone/LinphoneActivity.java b/src/org/linphone/LinphoneActivity.java index 253706369..9706ce662 100644 --- a/src/org/linphone/LinphoneActivity.java +++ b/src/org/linphone/LinphoneActivity.java @@ -545,7 +545,11 @@ public class LinphoneActivity extends TabActivity implements private void showToast(int id, String txt) { final String msg = String.format(getString(id), txt); - Toast.makeText(this, msg, Toast.LENGTH_LONG).show(); + mHandler.post(new Runnable() { + public void run() { + Toast.makeText(LinphoneActivity.this, msg, Toast.LENGTH_LONG).show(); + } + }); } @Override @@ -597,4 +601,4 @@ public class LinphoneActivity extends TabActivity implements interface ContactPicked { void setAddressAndGoToDialer(String number, String name, Uri photo); -} \ No newline at end of file +}