Prevent video overlay creation if video call is paused by remote

This commit is contained in:
Sylvain Berfini 2019-02-20 10:26:47 +01:00
parent 956f2da8a1
commit cb1429c7be

View file

@ -215,9 +215,16 @@ public class CallVideoFragment extends Fragment
@Override
public void onPause() {
if (LinphonePreferences.instance().isOverlayEnabled()) {
Core lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
if (LinphonePreferences.instance().isOverlayEnabled()
&& lc != null
&& lc.getCurrentCall() != null) {
Call call = lc.getCurrentCall();
if (call.getState() == Call.State.StreamsRunning) {
// Prevent overlay creation if video call is paused by remote
LinphoneService.instance().createOverlay();
}
}
super.onPause();
}