From 129b1e72075348da054138c07ee969497d2ecf88 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Mon, 18 Nov 2013 14:19:42 +0100 Subject: [PATCH] Force speaker since dialer is shown for tablets --- src/org/linphone/DialerFragment.java | 5 +++++ src/org/linphone/InCallActivity.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/org/linphone/DialerFragment.java b/src/org/linphone/DialerFragment.java index af7c578f7..eaadb1481 100644 --- a/src/org/linphone/DialerFragment.java +++ b/src/org/linphone/DialerFragment.java @@ -148,6 +148,11 @@ public class DialerFragment extends Fragment { LinphoneActivity.instance().updateDialerFragment(this); } + // Force speaker for tablets + LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull(); + if (lc != null) + lc.enableSpeaker(getResources().getBoolean(R.bool.isTablet)); + if (shouldEmptyAddressField) { mAddress.setText(""); } else { diff --git a/src/org/linphone/InCallActivity.java b/src/org/linphone/InCallActivity.java index f433eda20..67a3b1dc2 100644 --- a/src/org/linphone/InCallActivity.java +++ b/src/org/linphone/InCallActivity.java @@ -124,7 +124,7 @@ public class InCallActivity extends FragmentActivity implements isVideoEnabled = getIntent().getExtras() != null && getIntent().getExtras().getBoolean("VideoEnabled"); isTransferAllowed = getApplicationContext().getResources().getBoolean(R.bool.allow_transfers); showCallListInVideo = getApplicationContext().getResources().getBoolean(R.bool.show_current_calls_above_video); - isSpeakerEnabled = getResources().getBoolean(R.bool.isTablet); // Speaker default value to true if tablet, else false + isSpeakerEnabled = LinphoneManager.getLcIfManagerNotDestroyedOrNull().isSpeakerEnabled(); isAnimationDisabled = getApplicationContext().getResources().getBoolean(R.bool.disable_animations) || !LinphonePreferences.instance().areAnimationsEnabled(); cameraNumber = AndroidCameraConfiguration.retrieveCameras().length;