Revert the fullscreen flag check removal for layout with cutout

This is a quick partial revert of the patch 24d08ef to fix the
inconsistency after the clean-up work.

The camera team reported that with the clean-up, their in-app button
layout get messed up. Nothing should be affected by the clean-up work.
Thus, this CL is to revert the FLAG_FULLSCREEN check removal in
layoutWindowLw to keep the behavior the same.

The flag will be removed after we figure out why it is not compatible
with the app.

Bug: 167425558
Test: See reproduce steps in the bug.
Test: atest DisplayPolicyLayoutTests
Test: atest DisplayPolicyInsetsTests
Change-Id: I150d82dc5a233e7e7f458b83a379b1fa1770f0ea
This commit is contained in:
Yunfan Chen
2020-09-02 17:26:22 +09:00
parent d64cb948de
commit cde75c555c

View File

@@ -2118,8 +2118,8 @@ public class DisplayPolicy {
if (cutoutMode != LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS) {
final boolean attachedInParent = attached != null && !layoutInScreen;
final InsetsState requestedInsetsState = win.getRequestedInsetsState();
final boolean requestedFullscreen =
!requestedInsetsState.getSourceOrDefaultVisibility(ITYPE_STATUS_BAR);
final boolean requestedFullscreen = (fl & FLAG_FULLSCREEN) != 0
|| !requestedInsetsState.getSourceOrDefaultVisibility(ITYPE_STATUS_BAR);
final boolean requestedHideNavigation =
!requestedInsetsState.getSourceOrDefaultVisibility(ITYPE_NAVIGATION_BAR);