Added boolean to use linphone ringing easily + force speaker for linphone ringing

This commit is contained in:
Sylvain Berfini 2014-07-22 16:52:45 +02:00
parent 5e6a900798
commit bb5866ead0
3 changed files with 8 additions and 12 deletions

View file

@ -71,6 +71,7 @@
<bool name="intercept_outgoing_gsm_calls">false</bool>
<bool name="automatically_start_intercepted_outgoing_gsm_call">true</bool>
<bool name="store_ha1_passwords">true</bool>
<bool name="use_linphonecore_ringing">false</bool>
<!-- This settings handle the behavior of the view waiting for the remote provisioning configuration to be done -->
<bool name="display_sms_remote_provisioning_activity">false</bool>

View file

@ -141,11 +141,6 @@ public class DialerFragment extends Fragment {
LinphoneActivity.instance().showStatusBar();
}
// Force speaker for tablets
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
if (lc != null)
lc.enableSpeaker(getResources().getBoolean(R.bool.isTablet));
if (shouldEmptyAddressField) {
mAddress.setText("");
} else {

View file

@ -199,12 +199,7 @@ public class LinphoneManager implements LinphoneCoreListener {
Log.w("Routing audio to " + (speakerOn ? "speaker" : "earpiece") + ", disabling bluetooth audio route");
BluetoothManager.getInstance().disableBluetoothSCO();
if (!speakerOn) {
mLc.enableSpeaker(false);
} else {
mLc.enableSpeaker(true);
}
mLc.enableSpeaker(speakerOn);
audioStateChanged(speakerOn ? AudioState.SPEAKER : AudioState.EARPIECE);
}
@ -528,7 +523,11 @@ public class LinphoneManager implements LinphoneCoreListener {
Log.e(e, "cannot get version name");
}
if (mR.getBoolean(R.bool.use_linphonecore_ringing)) {
disableRinging();
} else {
mLc.setRing(null);
}
mLc.setRootCA(mLinphoneRootCaFile);
mLc.setPlayFile(mPauseSoundFile);
mLc.setChatDatabasePath(mChatDatabaseFile);
@ -996,6 +995,7 @@ public class LinphoneManager implements LinphoneCoreListener {
private synchronized void startRinging() {
if (disableRinging) {
routeAudioToSpeaker();
return;
}