diff --git a/src/org/linphone/LinphoneManager.java b/src/org/linphone/LinphoneManager.java index f4b0ddb17..004d3f695 100644 --- a/src/org/linphone/LinphoneManager.java +++ b/src/org/linphone/LinphoneManager.java @@ -1034,6 +1034,20 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag } } + if (state == State.CallUpdatedByRemote) { + // If the correspondent proposes video while audio call + boolean remoteVideo = call.getRemoteParams().getVideoEnabled(); + boolean localVideo = call.getCurrentParamsCopy().getVideoEnabled(); + boolean autoAcceptCameraPolicy = LinphonePreferences.instance().shouldAutomaticallyAcceptVideoRequests(); + if (remoteVideo && !localVideo && !autoAcceptCameraPolicy && !LinphoneManager.getLc().isInConference()) { + try { + LinphoneManager.getLc().deferCallUpdate(call); + } catch (LinphoneCoreException e) { + e.printStackTrace(); + } + } + } + if (state == State.StreamsRunning) { if (BluetoothManager.getInstance().isBluetoothHeadsetAvailable()) { BluetoothManager.getInstance().routeAudioToBluetooth();