Fix problem where AVPF is disabled by a video reINVITE, due to the use of LinphoneCall.getCurrentParamsCopy() instead of LinphoneCore.createCallParams().
This commit is contained in:
parent
789291dae6
commit
6b1fc72b5e
9 changed files with 18 additions and 18 deletions
|
@ -208,7 +208,7 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
|
||||||
} else if (state == State.Resuming) {
|
} else if (state == State.Resuming) {
|
||||||
if(LinphonePreferences.instance().isVideoEnabled()){
|
if(LinphonePreferences.instance().isVideoEnabled()){
|
||||||
status.refreshStatusItems(call, isVideoEnabled(call));
|
status.refreshStatusItems(call, isVideoEnabled(call));
|
||||||
if(call.getCurrentParamsCopy().getVideoEnabled()){
|
if(call.getCurrentParams().getVideoEnabled()){
|
||||||
showVideoView();
|
showVideoView();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -231,7 +231,7 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean remoteVideo = call.getRemoteParams().getVideoEnabled();
|
boolean remoteVideo = call.getRemoteParams().getVideoEnabled();
|
||||||
boolean localVideo = call.getCurrentParamsCopy().getVideoEnabled();
|
boolean localVideo = call.getCurrentParams().getVideoEnabled();
|
||||||
boolean autoAcceptCameraPolicy = LinphonePreferences.instance().shouldAutomaticallyAcceptVideoRequests();
|
boolean autoAcceptCameraPolicy = LinphonePreferences.instance().shouldAutomaticallyAcceptVideoRequests();
|
||||||
if (remoteVideo && !localVideo && !autoAcceptCameraPolicy && !LinphoneManager.getLc().isInConference()) {
|
if (remoteVideo && !localVideo && !autoAcceptCameraPolicy && !LinphoneManager.getLc().isInConference()) {
|
||||||
showAcceptCallUpdateDialog();
|
showAcceptCallUpdateDialog();
|
||||||
|
@ -254,10 +254,10 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
|
||||||
@Override
|
@Override
|
||||||
public void callEncryptionChanged(LinphoneCore lc, final LinphoneCall call, boolean encrypted, String authenticationToken) {
|
public void callEncryptionChanged(LinphoneCore lc, final LinphoneCall call, boolean encrypted, String authenticationToken) {
|
||||||
if (status != null) {
|
if (status != null) {
|
||||||
if(call.getCurrentParamsCopy().getMediaEncryption().equals(LinphoneCore.MediaEncryption.ZRTP) && !call.isAuthenticationTokenVerified()){
|
if(call.getCurrentParams().getMediaEncryption().equals(LinphoneCore.MediaEncryption.ZRTP) && !call.isAuthenticationTokenVerified()){
|
||||||
status.showZRTPDialog(call);
|
status.showZRTPDialog(call);
|
||||||
}
|
}
|
||||||
status.refreshStatusItems(call, call.getCurrentParamsCopy().getVideoEnabled());
|
status.refreshStatusItems(call, call.getCurrentParams().getVideoEnabled());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,7 +329,7 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
|
||||||
|
|
||||||
private boolean isVideoEnabled(LinphoneCall call) {
|
private boolean isVideoEnabled(LinphoneCall call) {
|
||||||
if(call != null){
|
if(call != null){
|
||||||
return call.getCurrentParamsCopy().getVideoEnabled();
|
return call.getCurrentParams().getVideoEnabled();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1759,7 +1759,7 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
|
||||||
if (LinphoneManager.getLcIfManagerNotDestroyedOrNull() == null) return;
|
if (LinphoneManager.getLcIfManagerNotDestroyedOrNull() == null) return;
|
||||||
synchronized(LinphoneManager.getLc()) {
|
synchronized(LinphoneManager.getLc()) {
|
||||||
if (LinphoneActivity.isInstanciated()) {
|
if (LinphoneActivity.isInstanciated()) {
|
||||||
LinphoneCallParams params = call.getCurrentParamsCopy();
|
LinphoneCallParams params = call.getCurrentParams();
|
||||||
if (params != null) {
|
if (params != null) {
|
||||||
LinphoneCallStats audioStats = call.getAudioStats();
|
LinphoneCallStats audioStats = call.getAudioStats();
|
||||||
LinphoneCallStats videoStats = null;
|
LinphoneCallStats videoStats = null;
|
||||||
|
|
|
@ -85,7 +85,7 @@ public class CallManager {
|
||||||
Log.e("Trying to reinviteWithVideo while not in call: doing nothing");
|
Log.e("Trying to reinviteWithVideo while not in call: doing nothing");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
LinphoneCallParams params = lCall.getCurrentParamsCopy();
|
LinphoneCallParams params = lc.createCallParams(lCall);
|
||||||
|
|
||||||
if (params.getVideoEnabled()) return false;
|
if (params.getVideoEnabled()) return false;
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ public class CallManager {
|
||||||
Log.e("Trying to reinvite while not in call: doing nothing");
|
Log.e("Trying to reinvite while not in call: doing nothing");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LinphoneCallParams params = lCall.getCurrentParamsCopy();
|
LinphoneCallParams params = lc.createCallParams(lCall);
|
||||||
bm().updateWithProfileSettings(lc, params);
|
bm().updateWithProfileSettings(lc, params);
|
||||||
lc.updateCall(lCall, params);
|
lc.updateCall(lCall, params);
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,7 @@ public class CallManager {
|
||||||
Log.e("Trying to updateCall while not in call: doing nothing");
|
Log.e("Trying to updateCall while not in call: doing nothing");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LinphoneCallParams params = lCall.getCurrentParamsCopy();
|
LinphoneCallParams params = lc.createCallParams(lCall);
|
||||||
bm().updateWithProfileSettings(lc, params);
|
bm().updateWithProfileSettings(lc, params);
|
||||||
lc.updateCall(lCall, null);
|
lc.updateCall(lCall, null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1012,7 +1012,7 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
|
||||||
if (lc != null) {
|
if (lc != null) {
|
||||||
lc.setDeviceRotation(rotation);
|
lc.setDeviceRotation(rotation);
|
||||||
LinphoneCall currentCall = lc.getCurrentCall();
|
LinphoneCall currentCall = lc.getCurrentCall();
|
||||||
if (currentCall != null && currentCall.cameraEnabled() && currentCall.getCurrentParamsCopy().getVideoEnabled()) {
|
if (currentCall != null && currentCall.cameraEnabled() && currentCall.getCurrentParams().getVideoEnabled()) {
|
||||||
lc.updateCall(currentCall, null);
|
lc.updateCall(currentCall, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1257,7 +1257,7 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
||||||
if (state == State.CallUpdatedByRemote) {
|
if (state == State.CallUpdatedByRemote) {
|
||||||
// If the correspondent proposes video while audio call
|
// If the correspondent proposes video while audio call
|
||||||
boolean remoteVideo = call.getRemoteParams().getVideoEnabled();
|
boolean remoteVideo = call.getRemoteParams().getVideoEnabled();
|
||||||
boolean localVideo = call.getCurrentParamsCopy().getVideoEnabled();
|
boolean localVideo = call.getCurrentParams().getVideoEnabled();
|
||||||
boolean autoAcceptCameraPolicy = LinphonePreferences.instance().shouldAutomaticallyAcceptVideoRequests();
|
boolean autoAcceptCameraPolicy = LinphonePreferences.instance().shouldAutomaticallyAcceptVideoRequests();
|
||||||
if (remoteVideo && !localVideo && !autoAcceptCameraPolicy && !LinphoneManager.getLc().isInConference()) {
|
if (remoteVideo && !localVideo && !autoAcceptCameraPolicy && !LinphoneManager.getLc().isInConference()) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -459,7 +459,7 @@ public final class LinphoneService extends Service {
|
||||||
if (mOverlay != null) destroyOverlay();
|
if (mOverlay != null) destroyOverlay();
|
||||||
|
|
||||||
LinphoneCall call = LinphoneManager.getLc().getCurrentCall();
|
LinphoneCall call = LinphoneManager.getLc().getCurrentCall();
|
||||||
if (call == null || !call.getCurrentParamsCopy().getVideoEnabled()) return;
|
if (call == null || !call.getCurrentParams().getVideoEnabled()) return;
|
||||||
|
|
||||||
mOverlay = new LinphoneOverlay(this);
|
mOverlay = new LinphoneOverlay(this);
|
||||||
WindowManager.LayoutParams params = mOverlay.getWindowManagerLayoutParams();
|
WindowManager.LayoutParams params = mOverlay.getWindowManagerLayoutParams();
|
||||||
|
@ -533,7 +533,7 @@ public final class LinphoneService extends Service {
|
||||||
public void refreshIncallIcon(LinphoneCall currentCall) {
|
public void refreshIncallIcon(LinphoneCall currentCall) {
|
||||||
LinphoneCore lc = LinphoneManager.getLc();
|
LinphoneCore lc = LinphoneManager.getLc();
|
||||||
if (currentCall != null) {
|
if (currentCall != null) {
|
||||||
if (currentCall.getCurrentParamsCopy().getVideoEnabled() && currentCall.cameraEnabled()) {
|
if (currentCall.getCurrentParams().getVideoEnabled() && currentCall.cameraEnabled()) {
|
||||||
// checking first current params is mandatory
|
// checking first current params is mandatory
|
||||||
setIncallIcon(IncallIconState.VIDEO);
|
setIncallIcon(IncallIconState.VIDEO);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -312,7 +312,7 @@ public class StatusFragment extends Fragment {
|
||||||
if (isInCall && (call != null || lc.getConferenceSize() > 1 || lc.getCallsNb() > 0)) {
|
if (isInCall && (call != null || lc.getConferenceSize() > 1 || lc.getCallsNb() > 0)) {
|
||||||
if (call != null) {
|
if (call != null) {
|
||||||
startCallQuality();
|
startCallQuality();
|
||||||
refreshStatusItems(call, call.getCurrentParamsCopy().getVideoEnabled());
|
refreshStatusItems(call, call.getCurrentParams().getVideoEnabled());
|
||||||
}
|
}
|
||||||
menu.setVisibility(View.INVISIBLE);
|
menu.setVisibility(View.INVISIBLE);
|
||||||
encryption.setVisibility(View.VISIBLE);
|
encryption.setVisibility(View.VISIBLE);
|
||||||
|
@ -351,7 +351,7 @@ public class StatusFragment extends Fragment {
|
||||||
public void refreshStatusItems(final LinphoneCall call, boolean isVideoEnabled) {
|
public void refreshStatusItems(final LinphoneCall call, boolean isVideoEnabled) {
|
||||||
if (call != null) {
|
if (call != null) {
|
||||||
voicemailCount.setVisibility(View.GONE);
|
voicemailCount.setVisibility(View.GONE);
|
||||||
MediaEncryption mediaEncryption = call.getCurrentParamsCopy().getMediaEncryption();
|
MediaEncryption mediaEncryption = call.getCurrentParams().getMediaEncryption();
|
||||||
|
|
||||||
if (isVideoEnabled) {
|
if (isVideoEnabled) {
|
||||||
//background.setVisibility(View.GONE);
|
//background.setVisibility(View.GONE);
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class LinphoneOverlay extends org.linphone.mediastream.video.display.GL2J
|
||||||
});
|
});
|
||||||
|
|
||||||
LinphoneCall call = LinphoneManager.getLc().getCurrentCall();
|
LinphoneCall call = LinphoneManager.getLc().getCurrentCall();
|
||||||
LinphoneCallParams callParams = call.getCurrentParamsCopy();
|
LinphoneCallParams callParams = call.getCurrentParams();
|
||||||
params.width = callParams.getReceivedVideoSize().width;
|
params.width = callParams.getReceivedVideoSize().width;
|
||||||
params.height = callParams.getReceivedVideoSize().height;
|
params.height = callParams.getReceivedVideoSize().height;
|
||||||
LinphoneManager.getLc().setVideoWindow(androidVideoWindowImpl);
|
LinphoneManager.getLc().setVideoWindow(androidVideoWindowImpl);
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 1e684cd9a7440c0ddb5cdc8b8c9b80ab8733c2ce
|
Subproject commit 9b07c787fdc60463e5746a4f4f8530d40f2eb53c
|
|
@ -1 +1 @@
|
||||||
Subproject commit f74e37becfc6377bd7124b72aca129310dff8e15
|
Subproject commit c1434a3f7c029fb69f557fca2b5fa1682786da5f
|
Loading…
Reference in a new issue