Added auto answer call option in custom xml
This commit is contained in:
parent
1c3e19eb98
commit
b77c23b889
2 changed files with 9 additions and 2 deletions
|
@ -64,6 +64,7 @@
|
||||||
<bool name="disable_chat__message_notification">false</bool>
|
<bool name="disable_chat__message_notification">false</bool>
|
||||||
<bool name="disable_chat_send_file">false</bool>
|
<bool name="disable_chat_send_file">false</bool>
|
||||||
<bool name="use_linphone_chat_storage">true</bool>
|
<bool name="use_linphone_chat_storage">true</bool>
|
||||||
|
<bool name="auto_answer_calls">false</bool>
|
||||||
|
|
||||||
<bool name="hash_images_as_name_before_upload">true</bool>
|
<bool name="hash_images_as_name_before_upload">true</bool>
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,6 @@ import org.linphone.core.LinphoneInfoMessage;
|
||||||
import org.linphone.core.LinphoneProxyConfig;
|
import org.linphone.core.LinphoneProxyConfig;
|
||||||
import org.linphone.core.PayloadType;
|
import org.linphone.core.PayloadType;
|
||||||
import org.linphone.core.SubscriptionState;
|
import org.linphone.core.SubscriptionState;
|
||||||
import org.linphone.core.VideoSize;
|
|
||||||
import org.linphone.mediastream.Log;
|
import org.linphone.mediastream.Log;
|
||||||
import org.linphone.mediastream.Version;
|
import org.linphone.mediastream.Version;
|
||||||
import org.linphone.mediastream.video.capture.AndroidVideoApi5JniWrapper;
|
import org.linphone.mediastream.video.capture.AndroidVideoApi5JniWrapper;
|
||||||
|
@ -1259,7 +1258,14 @@ public class LinphoneManager implements LinphoneCoreListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state == IncomingReceived || (state == State.CallIncomingEarlyMedia && mR.getBoolean(R.bool.allow_ringing_while_early_media))) {
|
if (state == IncomingReceived && mR.getBoolean(R.bool.auto_answer_calls)) {
|
||||||
|
try {
|
||||||
|
mLc.acceptCall(call);
|
||||||
|
} catch (LinphoneCoreException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (state == IncomingReceived || (state == State.CallIncomingEarlyMedia && mR.getBoolean(R.bool.allow_ringing_while_early_media))) {
|
||||||
// Brighten screen for at least 10 seconds
|
// Brighten screen for at least 10 seconds
|
||||||
if (mLc.getCallsNb() == 1) {
|
if (mLc.getCallsNb() == 1) {
|
||||||
ringingCall = call;
|
ringingCall = call;
|
||||||
|
|
Loading…
Reference in a new issue