From d9ef6e235c9ed7fb580939e2d95d7af6b95d4fcc Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Fri, 30 Nov 2012 11:50:01 +0100 Subject: [PATCH] Only display default account status in status bar --- src/org/linphone/LinphoneActivity.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/org/linphone/LinphoneActivity.java b/src/org/linphone/LinphoneActivity.java index 7af9345f2..161fe94ce 100644 --- a/src/org/linphone/LinphoneActivity.java +++ b/src/org/linphone/LinphoneActivity.java @@ -646,7 +646,8 @@ public class LinphoneActivity extends FragmentActivity implements public void updateStatusFragment(StatusFragment fragment) { statusFragment = fragment; - if (LinphoneManager.getLc().getDefaultProxyConfig() != null) { + LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull(); + if (lc != null && lc.getDefaultProxyConfig() != null) { statusFragment.registrationStateChanged(LinphoneManager.getLc().getDefaultProxyConfig().getState()); } } @@ -774,7 +775,9 @@ public class LinphoneActivity extends FragmentActivity implements @Override public void onRegistrationStateChanged(RegistrationState state) { if (statusFragment != null) { - statusFragment.registrationStateChanged(state); + LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull(); + if (lc != null && lc.getDefaultProxyConfig() != null) + statusFragment.registrationStateChanged(lc.getDefaultProxyConfig().getState()); } }