From cb1429c7bec34b6f3d915857577711fec214f6e5 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Wed, 20 Feb 2019 10:26:47 +0100 Subject: [PATCH] Prevent video overlay creation if video call is paused by remote --- .../java/org/linphone/call/CallVideoFragment.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/linphone/call/CallVideoFragment.java b/app/src/main/java/org/linphone/call/CallVideoFragment.java index 31ff8085f..b9c8e857a 100644 --- a/app/src/main/java/org/linphone/call/CallVideoFragment.java +++ b/app/src/main/java/org/linphone/call/CallVideoFragment.java @@ -215,8 +215,15 @@ public class CallVideoFragment extends Fragment @Override public void onPause() { - if (LinphonePreferences.instance().isOverlayEnabled()) { - LinphoneService.instance().createOverlay(); + 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();