From 47f8aa2e8598288970791c91915b94d3d4811389 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Fri, 27 Jul 2012 17:46:32 +0200 Subject: [PATCH] Fix exiting issue + AMRNB codec by default --- Makefile | 2 +- src/org/linphone/StatusFragment.java | 25 ++++++++++++++----------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 87c875628..75365a265 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ prepare-mediastreamer2: prepare-sources: prepare-ffmpeg prepare-ilbc prepare-vpx prepare-silk prepare-srtp prepare-mediastreamer2 generate-libs: - $(NDK_PATH)/ndk-build BUILD_SILK=1 -j$(NUMCPUS) + $(NDK_PATH)/ndk-build BUILD_SILK=1 BUILD_AMRNB=full -j$(NUMCPUS) update-project: $(SDK_PATH)/android update project --path . diff --git a/src/org/linphone/StatusFragment.java b/src/org/linphone/StatusFragment.java index afb2bbc81..0d04b00d4 100644 --- a/src/org/linphone/StatusFragment.java +++ b/src/org/linphone/StatusFragment.java @@ -137,9 +137,10 @@ public class StatusFragment extends Fragment { } private void populateSliderContent() { - sliderContent.setDividerHeight(0); - AccountsListAdapter adapter = new AccountsListAdapter(LinphoneManager.getLc().getProxyConfigList()); - sliderContent.setAdapter(adapter); + if (LinphoneManager.isInstanciated() && LinphoneManager.getLc() != null) { + AccountsListAdapter adapter = new AccountsListAdapter(LinphoneManager.getLc().getProxyConfigList()); + sliderContent.setAdapter(adapter); + } } public void registrationStateChanged(final RegistrationState state) { @@ -160,14 +161,16 @@ public class StatusFragment extends Fragment { if (allAccountsLed == null) return; - allAccountsLed.removeAllViews(); - for (LinphoneProxyConfig lpc : LinphoneManager.getLc().getProxyConfigList()) { - ImageView led = new ImageView(getActivity()); - LinearLayout.LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); - led.setLayoutParams(params); - led.setAdjustViewBounds(true); - led.setImageResource(getStatusIconResource(lpc.getState(), false)); - allAccountsLed.addView(led); + if (LinphoneManager.isInstanciated() && LinphoneManager.getLc() != null) { + allAccountsLed.removeAllViews(); + for (LinphoneProxyConfig lpc : LinphoneManager.getLc().getProxyConfigList()) { + ImageView led = new ImageView(getActivity()); + LinearLayout.LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); + led.setLayoutParams(params); + led.setAdjustViewBounds(true); + led.setImageResource(getStatusIconResource(lpc.getState(), false)); + allAccountsLed.addView(led); + } } }