Hack to fix preview issue after call paused
This commit is contained in:
parent
9aee2dd375
commit
0245c56776
3 changed files with 6 additions and 7 deletions
|
@ -353,11 +353,6 @@ public class IncallActivity extends AbstractCalleesActivity implements
|
|||
List<LinphoneCall> 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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue