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,8 +215,15 @@ public class CallVideoFragment extends Fragment
@Override @Override
public void onPause() { public void onPause() {
if (LinphonePreferences.instance().isOverlayEnabled()) { Core lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
LinphoneService.instance().createOverlay(); 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(); super.onPause();