Added boolean to use linphone ringing easily + force speaker for linphone ringing
This commit is contained in:
parent
5e6a900798
commit
bb5866ead0
3 changed files with 8 additions and 12 deletions
|
@ -71,6 +71,7 @@
|
||||||
<bool name="intercept_outgoing_gsm_calls">false</bool>
|
<bool name="intercept_outgoing_gsm_calls">false</bool>
|
||||||
<bool name="automatically_start_intercepted_outgoing_gsm_call">true</bool>
|
<bool name="automatically_start_intercepted_outgoing_gsm_call">true</bool>
|
||||||
<bool name="store_ha1_passwords">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 -->
|
<!-- 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>
|
<bool name="display_sms_remote_provisioning_activity">false</bool>
|
||||||
|
|
|
@ -141,11 +141,6 @@ public class DialerFragment extends Fragment {
|
||||||
LinphoneActivity.instance().showStatusBar();
|
LinphoneActivity.instance().showStatusBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Force speaker for tablets
|
|
||||||
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
|
||||||
if (lc != null)
|
|
||||||
lc.enableSpeaker(getResources().getBoolean(R.bool.isTablet));
|
|
||||||
|
|
||||||
if (shouldEmptyAddressField) {
|
if (shouldEmptyAddressField) {
|
||||||
mAddress.setText("");
|
mAddress.setText("");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -199,12 +199,7 @@ public class LinphoneManager implements LinphoneCoreListener {
|
||||||
Log.w("Routing audio to " + (speakerOn ? "speaker" : "earpiece") + ", disabling bluetooth audio route");
|
Log.w("Routing audio to " + (speakerOn ? "speaker" : "earpiece") + ", disabling bluetooth audio route");
|
||||||
BluetoothManager.getInstance().disableBluetoothSCO();
|
BluetoothManager.getInstance().disableBluetoothSCO();
|
||||||
|
|
||||||
if (!speakerOn) {
|
mLc.enableSpeaker(speakerOn);
|
||||||
mLc.enableSpeaker(false);
|
|
||||||
} else {
|
|
||||||
mLc.enableSpeaker(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
audioStateChanged(speakerOn ? AudioState.SPEAKER : AudioState.EARPIECE);
|
audioStateChanged(speakerOn ? AudioState.SPEAKER : AudioState.EARPIECE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -528,7 +523,11 @@ public class LinphoneManager implements LinphoneCoreListener {
|
||||||
Log.e(e, "cannot get version name");
|
Log.e(e, "cannot get version name");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mR.getBoolean(R.bool.use_linphonecore_ringing)) {
|
||||||
|
disableRinging();
|
||||||
|
} else {
|
||||||
mLc.setRing(null);
|
mLc.setRing(null);
|
||||||
|
}
|
||||||
mLc.setRootCA(mLinphoneRootCaFile);
|
mLc.setRootCA(mLinphoneRootCaFile);
|
||||||
mLc.setPlayFile(mPauseSoundFile);
|
mLc.setPlayFile(mPauseSoundFile);
|
||||||
mLc.setChatDatabasePath(mChatDatabaseFile);
|
mLc.setChatDatabasePath(mChatDatabaseFile);
|
||||||
|
@ -996,6 +995,7 @@ public class LinphoneManager implements LinphoneCoreListener {
|
||||||
|
|
||||||
private synchronized void startRinging() {
|
private synchronized void startRinging() {
|
||||||
if (disableRinging) {
|
if (disableRinging) {
|
||||||
|
routeAudioToSpeaker();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue