From cde75c555ce4f54fdc47be4e1c85281056c71608 Mon Sep 17 00:00:00 2001 From: Yunfan Chen Date: Wed, 2 Sep 2020 17:26:22 +0900 Subject: [PATCH] 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 --- services/core/java/com/android/server/wm/DisplayPolicy.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java index abfbf2eb8b67d..f53d9837a512c 100644 --- a/services/core/java/com/android/server/wm/DisplayPolicy.java +++ b/services/core/java/com/android/server/wm/DisplayPolicy.java @@ -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);