Do not show join banner in pip mode.
This commit is contained in:
parent
167b9c13e5
commit
bfa56f771d
2 changed files with 16 additions and 1 deletions
|
@ -81,7 +81,6 @@ public class WebRtcCallActivity extends AppCompatActivity implements SafetyNumbe
|
||||||
public static final String EXTRA_ENABLE_VIDEO_IF_AVAILABLE = WebRtcCallActivity.class.getCanonicalName() + ".ENABLE_VIDEO_IF_AVAILABLE";
|
public static final String EXTRA_ENABLE_VIDEO_IF_AVAILABLE = WebRtcCallActivity.class.getCanonicalName() + ".ENABLE_VIDEO_IF_AVAILABLE";
|
||||||
|
|
||||||
private CallParticipantsListUpdatePopupWindow participantUpdateWindow;
|
private CallParticipantsListUpdatePopupWindow participantUpdateWindow;
|
||||||
private CallParticipantsListDialog participantsListDialog;
|
|
||||||
|
|
||||||
private WebRtcCallView callScreen;
|
private WebRtcCallView callScreen;
|
||||||
private TooltipPopup videoTooltip;
|
private TooltipPopup videoTooltip;
|
||||||
|
@ -189,6 +188,7 @@ public class WebRtcCallActivity extends AppCompatActivity implements SafetyNumbe
|
||||||
@Override
|
@Override
|
||||||
public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode, Configuration newConfig) {
|
public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode, Configuration newConfig) {
|
||||||
viewModel.setIsInPipMode(isInPictureInPictureMode);
|
viewModel.setIsInPipMode(isInPictureInPictureMode);
|
||||||
|
participantUpdateWindow.setEnabled(!isInPictureInPictureMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean enterPipModeIfPossible() {
|
private boolean enterPipModeIfPossible() {
|
||||||
|
@ -198,6 +198,7 @@ public class WebRtcCallActivity extends AppCompatActivity implements SafetyNumbe
|
||||||
.build();
|
.build();
|
||||||
enterPictureInPictureMode(params);
|
enterPictureInPictureMode(params);
|
||||||
CallParticipantsListDialog.dismiss(getSupportFragmentManager());
|
CallParticipantsListDialog.dismiss(getSupportFragmentManager());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -34,6 +34,8 @@ public class CallParticipantsListUpdatePopupWindow extends PopupWindow {
|
||||||
private final Set<CallParticipantListUpdate.Holder> pendingAdditions = new HashSet<>();
|
private final Set<CallParticipantListUpdate.Holder> pendingAdditions = new HashSet<>();
|
||||||
private final Set<CallParticipantListUpdate.Holder> pendingRemovals = new HashSet<>();
|
private final Set<CallParticipantListUpdate.Holder> pendingRemovals = new HashSet<>();
|
||||||
|
|
||||||
|
private boolean isEnabled = true;
|
||||||
|
|
||||||
public CallParticipantsListUpdatePopupWindow(@NonNull ViewGroup parent) {
|
public CallParticipantsListUpdatePopupWindow(@NonNull ViewGroup parent) {
|
||||||
super(LayoutInflater.from(parent.getContext()).inflate(R.layout.call_participant_list_update, parent, false),
|
super(LayoutInflater.from(parent.getContext()).inflate(R.layout.call_participant_list_update, parent, false),
|
||||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||||
|
@ -59,6 +61,14 @@ public class CallParticipantsListUpdatePopupWindow extends PopupWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setEnabled(boolean isEnabled) {
|
||||||
|
this.isEnabled = isEnabled;
|
||||||
|
|
||||||
|
if (!isEnabled) {
|
||||||
|
dismiss();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void showPending() {
|
private void showPending() {
|
||||||
if (!pendingAdditions.isEmpty()) {
|
if (!pendingAdditions.isEmpty()) {
|
||||||
showAdditions();
|
showAdditions();
|
||||||
|
@ -82,6 +92,10 @@ public class CallParticipantsListUpdatePopupWindow extends PopupWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void show() {
|
private void show() {
|
||||||
|
if (!isEnabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
showAtLocation(parent, Gravity.TOP | Gravity.START, 0, 0);
|
showAtLocation(parent, Gravity.TOP | Gravity.START, 0, 0);
|
||||||
measureChild();
|
measureChild();
|
||||||
update();
|
update();
|
||||||
|
|
Loading…
Add table
Reference in a new issue