diff --git a/src/org/linphone/IncallActivity.java b/src/org/linphone/IncallActivity.java index 758ed3a00..c7084bcf0 100644 --- a/src/org/linphone/IncallActivity.java +++ b/src/org/linphone/IncallActivity.java @@ -353,11 +353,6 @@ public class IncallActivity extends AbstractCalleesActivity implements List pausedCalls = LinphoneUtils.getCallsInState(lc(), Arrays.asList(State.Paused)); if (pausedCalls.size() == 1) { LinphoneCall callToResume = pausedCalls.get(0); - if (callToResume != null && callToResume.cameraEnabled() && callToResume.getCurrentParamsCopy().getVideoEnabled()) - { - finish(); - LinphoneActivity.instance().startVideoActivity(callToResume, 0); - } lc().resumeCall(callToResume); } } diff --git a/src/org/linphone/LinphoneActivity.java b/src/org/linphone/LinphoneActivity.java index ce0f36f86..0a7aa174b 100644 --- a/src/org/linphone/LinphoneActivity.java +++ b/src/org/linphone/LinphoneActivity.java @@ -486,7 +486,7 @@ public class LinphoneActivity extends TabActivity implements ContactPicked if (state == LinphoneCall.State.StreamsRunning && Version.isVideoCapable() && !call.isInConference()) { // call.cameraEnabled() contains the wish of the user // set in LinphoneManager#onCallStateChanged(OutgoingInit||IncomingReceived) - boolean videoEnabled = call.cameraEnabled() && call.getCurrentParamsCopy().getVideoEnabled(); + boolean videoEnabled = call.getCurrentParamsCopy().getVideoEnabled(); if (videoEnabled) { finishActivity(incall_activity); startVideoActivity(call, 0); diff --git a/src/org/linphone/VideoCallActivity.java b/src/org/linphone/VideoCallActivity.java index 34bf142f4..1435c2a6b 100755 --- a/src/org/linphone/VideoCallActivity.java +++ b/src/org/linphone/VideoCallActivity.java @@ -181,6 +181,10 @@ public class VideoCallActivity extends Activity implements LinphoneOnCallStateCh } } + // Hack to force the redraw of the preview + // Camera will be re-enabled in onResume just after anyway + shouldRestartVideoOnResume = true; + LinphoneManager.getLc().getCurrentCall().enableCamera(false); } void updateQualityOfSignalIcon(float quality) @@ -288,7 +292,6 @@ public class VideoCallActivity extends Activity implements LinphoneOnCallStateCh // Send NoWebcam since Android 4.0 can't get the video from the webcam if the activity is not in foreground shouldRestartVideoOnResume = true; LinphoneManager.getLc().getCurrentCall().enableCamera(false); - } launched=false; synchronized (androidVideoWindowImpl) { @@ -436,5 +439,6 @@ public class VideoCallActivity extends Activity implements LinphoneOnCallStateCh } else { LinphoneManager.getLc().terminateAllCalls(); } + finish(); } }