Loading services/core/java/com/android/server/wm/DisplayPolicy.java +12 −0 Original line number Diff line number Diff line Loading @@ -362,6 +362,7 @@ public class DisplayPolicy { private WindowState mTopFullscreenOpaqueWindowState; private boolean mTopIsFullscreen; private int mNavBarOpacityMode = NAV_BAR_OPAQUE_WHEN_FREEFORM_OR_DOCKED; private boolean mForceConsumeSystemBars; private boolean mForceShowSystemBars; private boolean mShowingDream; Loading Loading @@ -1561,6 +1562,13 @@ public class DisplayPolicy { return ANIMATION_STYLEABLE; } /** * @return true if the system bars are forced to be consumed */ public boolean areSystemBarsForcedConsumedLw() { return mForceConsumeSystemBars; } /** * @return true if the system bars are forced to stay visible */ Loading Loading @@ -2463,6 +2471,10 @@ public class DisplayPolicy { // We need to force showing system bars when the multi-window or freeform root task is // visible. mForceShowSystemBars = multiWindowTaskVisible || freeformRootTaskVisible; // We need to force the consumption of the system bars if they are force shown or if they // are controlled by a remote insets controller. mForceConsumeSystemBars = mForceShowSystemBars || mDisplayContent.getInsetsPolicy().remoteInsetsControllerControlsSystemBars(win); mDisplayContent.getInsetsPolicy().updateBarControlTarget(win); final boolean topAppHidesStatusBar = topAppHidesStatusBar(); Loading services/core/java/com/android/server/wm/WindowManagerService.java +3 −3 Original line number Diff line number Diff line Loading @@ -1831,7 +1831,7 @@ public class WindowManagerService extends IWindowManager.Stub prepareNoneTransitionForRelaunching(activity); } if (displayPolicy.areSystemBarsForcedShownLw()) { if (displayPolicy.areSystemBarsForcedConsumedLw()) { res |= WindowManagerGlobal.ADD_FLAG_ALWAYS_CONSUME_SYSTEM_BARS; } Loading Loading @@ -2557,7 +2557,7 @@ public class WindowManagerService extends IWindowManager.Stub if (win.mActivityRecord != null) { win.mActivityRecord.updateReportedVisibilityLocked(); } if (displayPolicy.areSystemBarsForcedShownLw()) { if (displayPolicy.areSystemBarsForcedConsumedLw()) { result |= WindowManagerGlobal.RELAYOUT_RES_CONSUME_ALWAYS_SYSTEM_BARS; } if (!win.isGoneForLayout()) { Loading Loading @@ -8879,7 +8879,7 @@ public class WindowManagerService extends IWindowManager.Stub : overrideScale; outInsetsState.scale(1f / compatScale); } return dc.getDisplayPolicy().areSystemBarsForcedShownLw(); return dc.getDisplayPolicy().areSystemBarsForcedConsumedLw(); } } finally { Binder.restoreCallingIdentity(origId); Loading services/core/java/com/android/server/wm/WindowState.java +1 −1 Original line number Diff line number Diff line Loading @@ -3918,7 +3918,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP final boolean forceRelayout = syncWithBuffers || isDragResizeChanged; final DisplayContent displayContent = getDisplayContent(); final boolean alwaysConsumeSystemBars = displayContent.getDisplayPolicy().areSystemBarsForcedShownLw(); displayContent.getDisplayPolicy().areSystemBarsForcedConsumedLw(); final int displayId = displayContent.getDisplayId(); if (isDragResizeChanged) { Loading Loading
services/core/java/com/android/server/wm/DisplayPolicy.java +12 −0 Original line number Diff line number Diff line Loading @@ -362,6 +362,7 @@ public class DisplayPolicy { private WindowState mTopFullscreenOpaqueWindowState; private boolean mTopIsFullscreen; private int mNavBarOpacityMode = NAV_BAR_OPAQUE_WHEN_FREEFORM_OR_DOCKED; private boolean mForceConsumeSystemBars; private boolean mForceShowSystemBars; private boolean mShowingDream; Loading Loading @@ -1561,6 +1562,13 @@ public class DisplayPolicy { return ANIMATION_STYLEABLE; } /** * @return true if the system bars are forced to be consumed */ public boolean areSystemBarsForcedConsumedLw() { return mForceConsumeSystemBars; } /** * @return true if the system bars are forced to stay visible */ Loading Loading @@ -2463,6 +2471,10 @@ public class DisplayPolicy { // We need to force showing system bars when the multi-window or freeform root task is // visible. mForceShowSystemBars = multiWindowTaskVisible || freeformRootTaskVisible; // We need to force the consumption of the system bars if they are force shown or if they // are controlled by a remote insets controller. mForceConsumeSystemBars = mForceShowSystemBars || mDisplayContent.getInsetsPolicy().remoteInsetsControllerControlsSystemBars(win); mDisplayContent.getInsetsPolicy().updateBarControlTarget(win); final boolean topAppHidesStatusBar = topAppHidesStatusBar(); Loading
services/core/java/com/android/server/wm/WindowManagerService.java +3 −3 Original line number Diff line number Diff line Loading @@ -1831,7 +1831,7 @@ public class WindowManagerService extends IWindowManager.Stub prepareNoneTransitionForRelaunching(activity); } if (displayPolicy.areSystemBarsForcedShownLw()) { if (displayPolicy.areSystemBarsForcedConsumedLw()) { res |= WindowManagerGlobal.ADD_FLAG_ALWAYS_CONSUME_SYSTEM_BARS; } Loading Loading @@ -2557,7 +2557,7 @@ public class WindowManagerService extends IWindowManager.Stub if (win.mActivityRecord != null) { win.mActivityRecord.updateReportedVisibilityLocked(); } if (displayPolicy.areSystemBarsForcedShownLw()) { if (displayPolicy.areSystemBarsForcedConsumedLw()) { result |= WindowManagerGlobal.RELAYOUT_RES_CONSUME_ALWAYS_SYSTEM_BARS; } if (!win.isGoneForLayout()) { Loading Loading @@ -8879,7 +8879,7 @@ public class WindowManagerService extends IWindowManager.Stub : overrideScale; outInsetsState.scale(1f / compatScale); } return dc.getDisplayPolicy().areSystemBarsForcedShownLw(); return dc.getDisplayPolicy().areSystemBarsForcedConsumedLw(); } } finally { Binder.restoreCallingIdentity(origId); Loading
services/core/java/com/android/server/wm/WindowState.java +1 −1 Original line number Diff line number Diff line Loading @@ -3918,7 +3918,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP final boolean forceRelayout = syncWithBuffers || isDragResizeChanged; final DisplayContent displayContent = getDisplayContent(); final boolean alwaysConsumeSystemBars = displayContent.getDisplayPolicy().areSystemBarsForcedShownLw(); displayContent.getDisplayPolicy().areSystemBarsForcedConsumedLw(); final int displayId = displayContent.getDisplayId(); if (isDragResizeChanged) { Loading