Loading services/core/java/com/android/server/wm/DisplayPolicy.java +8 −6 Original line number Diff line number Diff line Loading @@ -1623,14 +1623,13 @@ public class DisplayPolicy { } /** * @return Whether the top app should hide the statusbar based on the top fullscreen opaque * window. * @return Whether the top fullscreen app hides the given type of system bar. */ boolean topAppHidesStatusBar() { boolean topAppHidesSystemBar(@InsetsType int type) { if (mTopFullscreenOpaqueWindowState == null || mForceShowSystemBars) { return false; } return !mTopFullscreenOpaqueWindowState.isRequestedVisible(Type.statusBars()); return !mTopFullscreenOpaqueWindowState.isRequestedVisible(type); } /** Loading Loading @@ -2053,7 +2052,10 @@ public class DisplayPolicy { navColorWin != null && navColorWin == mDisplayContent.mInputMethodWindow; final int appearance = updateLightNavigationBarLw(win.mAttrs.insetsFlags.appearance, navColorWin) | opaqueAppearance; final int behavior = win.mAttrs.insetsFlags.behavior; final WindowState navBarControlWin = topAppHidesSystemBar(Type.navigationBars()) ? mTopFullscreenOpaqueWindowState : win; final int behavior = navBarControlWin.mAttrs.insetsFlags.behavior; final String focusedApp = win.mAttrs.packageName; final boolean isFullscreen = !win.isRequestedVisible(Type.statusBars()) || !win.isRequestedVisible(Type.navigationBars()); Loading Loading @@ -2168,7 +2170,7 @@ public class DisplayPolicy { || mDisplayContent.getInsetsPolicy().remoteInsetsControllerControlsSystemBars(win); mDisplayContent.getInsetsPolicy().updateBarControlTarget(win); final boolean topAppHidesStatusBar = topAppHidesStatusBar(); final boolean topAppHidesStatusBar = topAppHidesSystemBar(Type.statusBars()); if (getStatusBar() != null) { final StatusBarManagerInternal statusBar = getStatusBarManagerInternal(); if (statusBar != null) { Loading services/core/java/com/android/server/wm/InsetsPolicy.java +10 −1 Original line number Diff line number Diff line Loading @@ -532,7 +532,8 @@ class InsetsPolicy { // fake control to the client, so that it can re-show the bar during this scenario. return mDummyControlTarget; } if (!canBeTopFullscreenOpaqueWindow(focusedWin) && mPolicy.topAppHidesStatusBar() if (!canBeTopFullscreenOpaqueWindow(focusedWin) && mPolicy.topAppHidesSystemBar(Type.statusBars()) && (notificationShade == null || !notificationShade.canReceiveKeys())) { // Non-fullscreen focused window should not break the state that the top-fullscreen-app // window hides status bar, unless the notification shade can receive keys. Loading Loading @@ -592,6 +593,14 @@ class InsetsPolicy { // fake control to the client, so that it can re-show the bar during this scenario. return mDummyControlTarget; } final WindowState notificationShade = mPolicy.getNotificationShade(); if (!canBeTopFullscreenOpaqueWindow(focusedWin) && mPolicy.topAppHidesSystemBar(Type.navigationBars()) && (notificationShade == null || !notificationShade.canReceiveKeys())) { // Non-fullscreen focused window should not break the state that the top-fullscreen-app // window hides navigation bar, unless the notification shade can receive keys. return mPolicy.getTopFullscreenOpaqueWindow(); } return focusedWin; } Loading Loading
services/core/java/com/android/server/wm/DisplayPolicy.java +8 −6 Original line number Diff line number Diff line Loading @@ -1623,14 +1623,13 @@ public class DisplayPolicy { } /** * @return Whether the top app should hide the statusbar based on the top fullscreen opaque * window. * @return Whether the top fullscreen app hides the given type of system bar. */ boolean topAppHidesStatusBar() { boolean topAppHidesSystemBar(@InsetsType int type) { if (mTopFullscreenOpaqueWindowState == null || mForceShowSystemBars) { return false; } return !mTopFullscreenOpaqueWindowState.isRequestedVisible(Type.statusBars()); return !mTopFullscreenOpaqueWindowState.isRequestedVisible(type); } /** Loading Loading @@ -2053,7 +2052,10 @@ public class DisplayPolicy { navColorWin != null && navColorWin == mDisplayContent.mInputMethodWindow; final int appearance = updateLightNavigationBarLw(win.mAttrs.insetsFlags.appearance, navColorWin) | opaqueAppearance; final int behavior = win.mAttrs.insetsFlags.behavior; final WindowState navBarControlWin = topAppHidesSystemBar(Type.navigationBars()) ? mTopFullscreenOpaqueWindowState : win; final int behavior = navBarControlWin.mAttrs.insetsFlags.behavior; final String focusedApp = win.mAttrs.packageName; final boolean isFullscreen = !win.isRequestedVisible(Type.statusBars()) || !win.isRequestedVisible(Type.navigationBars()); Loading Loading @@ -2168,7 +2170,7 @@ public class DisplayPolicy { || mDisplayContent.getInsetsPolicy().remoteInsetsControllerControlsSystemBars(win); mDisplayContent.getInsetsPolicy().updateBarControlTarget(win); final boolean topAppHidesStatusBar = topAppHidesStatusBar(); final boolean topAppHidesStatusBar = topAppHidesSystemBar(Type.statusBars()); if (getStatusBar() != null) { final StatusBarManagerInternal statusBar = getStatusBarManagerInternal(); if (statusBar != null) { Loading
services/core/java/com/android/server/wm/InsetsPolicy.java +10 −1 Original line number Diff line number Diff line Loading @@ -532,7 +532,8 @@ class InsetsPolicy { // fake control to the client, so that it can re-show the bar during this scenario. return mDummyControlTarget; } if (!canBeTopFullscreenOpaqueWindow(focusedWin) && mPolicy.topAppHidesStatusBar() if (!canBeTopFullscreenOpaqueWindow(focusedWin) && mPolicy.topAppHidesSystemBar(Type.statusBars()) && (notificationShade == null || !notificationShade.canReceiveKeys())) { // Non-fullscreen focused window should not break the state that the top-fullscreen-app // window hides status bar, unless the notification shade can receive keys. Loading Loading @@ -592,6 +593,14 @@ class InsetsPolicy { // fake control to the client, so that it can re-show the bar during this scenario. return mDummyControlTarget; } final WindowState notificationShade = mPolicy.getNotificationShade(); if (!canBeTopFullscreenOpaqueWindow(focusedWin) && mPolicy.topAppHidesSystemBar(Type.navigationBars()) && (notificationShade == null || !notificationShade.canReceiveKeys())) { // Non-fullscreen focused window should not break the state that the top-fullscreen-app // window hides navigation bar, unless the notification shade can receive keys. return mPolicy.getTopFullscreenOpaqueWindow(); } return focusedWin; } Loading