Hide members list when user enters pip.

This commit is contained in:
Alex Hart
2020-12-07 14:50:11 -04:00
parent 5de50f1a8b
commit be53bfa88f
2 changed files with 10 additions and 0 deletions

View File

@@ -81,6 +81,7 @@ public class WebRtcCallActivity extends AppCompatActivity implements SafetyNumbe
public static final String EXTRA_ENABLE_VIDEO_IF_AVAILABLE = WebRtcCallActivity.class.getCanonicalName() + ".ENABLE_VIDEO_IF_AVAILABLE";
private CallParticipantsListUpdatePopupWindow participantUpdateWindow;
private CallParticipantsListDialog participantsListDialog;
private WebRtcCallView callScreen;
private TooltipPopup videoTooltip;
@@ -196,6 +197,7 @@ public class WebRtcCallActivity extends AppCompatActivity implements SafetyNumbe
.setAspectRatio(new Rational(9, 16))
.build();
enterPictureInPictureMode(params);
CallParticipantsListDialog.dismiss(getSupportFragmentManager());
return true;
}
return false;

View File

@@ -9,6 +9,7 @@ import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.lifecycle.ViewModelProviders;
import androidx.recyclerview.widget.LinearLayoutManager;
@@ -38,6 +39,13 @@ public class CallParticipantsListDialog extends BottomSheetDialogFragment {
fragment.show(manager, BottomSheetUtil.STANDARD_BOTTOM_SHEET_FRAGMENT_TAG);
}
public static void dismiss(@NonNull FragmentManager manager) {
Fragment fragment = manager.findFragmentByTag(BottomSheetUtil.STANDARD_BOTTOM_SHEET_FRAGMENT_TAG);
if (fragment instanceof CallParticipantsListDialog) {
((CallParticipantsListDialog) fragment).dismissAllowingStateLoss();
}
}
@Override
public void show(@NonNull FragmentManager manager, @Nullable String tag) {
BottomSheetUtil.show(manager, tag, this);