Loading core/java/android/view/InsetsSource.java +1 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ public class InsetsSource implements Parcelable { public InsetsSource(@InternalInsetsType int type) { mType = type; mFrame = new Rect(); mVisible = InsetsState.getDefaultVisibility(type); } public InsetsSource(InsetsSource other) { Loading core/tests/coretests/src/android/view/InsetsSourceConsumerTest.java +4 −0 Original line number Diff line number Diff line Loading @@ -102,8 +102,12 @@ public class InsetsSourceConsumerTest { @Test public void testShow() { // Insets source starts out visible mConsumer.hide(); mConsumer.show(); assertTrue("Consumer should be visible", mConsumer.isVisible()); verify(mSpyInsetsSource).setVisible(eq(false)); verify(mSpyInsetsSource).setVisible(eq(true)); } Loading services/core/java/com/android/server/wm/DisplayPolicy.java +5 −2 Original line number Diff line number Diff line Loading @@ -2192,10 +2192,13 @@ public class DisplayPolicy { final boolean attachedInParent = attached != null && !layoutInScreen; final boolean requestedFullscreen = (fl & FLAG_FULLSCREEN) != 0 || (requestedSysUiFl & View.SYSTEM_UI_FLAG_FULLSCREEN) != 0 || !win.getClientInsetsState().getSource(ITYPE_STATUS_BAR).isVisible(); || (ViewRootImpl.sNewInsetsMode == NEW_INSETS_MODE_FULL && !win.getRequestedInsetsState().getSource(ITYPE_STATUS_BAR).isVisible()); final boolean requestedHideNavigation = (requestedSysUiFl & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) != 0 || !win.getClientInsetsState().getSource(ITYPE_NAVIGATION_BAR).isVisible(); || (ViewRootImpl.sNewInsetsMode == NEW_INSETS_MODE_FULL && !win.getRequestedInsetsState().getSource(ITYPE_NAVIGATION_BAR) .isVisible()); // TYPE_BASE_APPLICATION windows are never considered floating here because they don't get // cropped / shifted to the displayFrame in WindowState. Loading services/core/java/com/android/server/wm/InsetsPolicy.java +3 −2 Original line number Diff line number Diff line Loading @@ -66,10 +66,11 @@ class InsetsPolicy { } mStatusBar.setVisible(focusedWin == null || focusedWin != getStatusControlTarget(focusedWin) || focusedWin.getClientInsetsState().getSource(ITYPE_STATUS_BAR).isVisible()); || focusedWin.getRequestedInsetsState().getSource(ITYPE_STATUS_BAR).isVisible()); mNavBar.setVisible(focusedWin == null || focusedWin != getNavControlTarget(focusedWin) || focusedWin.getClientInsetsState().getSource(ITYPE_NAVIGATION_BAR).isVisible()); || focusedWin.getRequestedInsetsState().getSource(ITYPE_NAVIGATION_BAR) .isVisible()); } boolean isHidden(@InternalInsetsType int type) { Loading services/core/java/com/android/server/wm/Session.java +1 −1 Original line number Diff line number Diff line Loading @@ -463,7 +463,7 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { final WindowState windowState = mService.windowForClientLocked(this, window, false /* throwOnError */); if (windowState != null) { windowState.setClientInsetsState(state); windowState.updateRequestedInsetsState(state); windowState.getDisplayContent().getInsetsPolicy().onInsetsModified( windowState, state); } Loading Loading
core/java/android/view/InsetsSource.java +1 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ public class InsetsSource implements Parcelable { public InsetsSource(@InternalInsetsType int type) { mType = type; mFrame = new Rect(); mVisible = InsetsState.getDefaultVisibility(type); } public InsetsSource(InsetsSource other) { Loading
core/tests/coretests/src/android/view/InsetsSourceConsumerTest.java +4 −0 Original line number Diff line number Diff line Loading @@ -102,8 +102,12 @@ public class InsetsSourceConsumerTest { @Test public void testShow() { // Insets source starts out visible mConsumer.hide(); mConsumer.show(); assertTrue("Consumer should be visible", mConsumer.isVisible()); verify(mSpyInsetsSource).setVisible(eq(false)); verify(mSpyInsetsSource).setVisible(eq(true)); } Loading
services/core/java/com/android/server/wm/DisplayPolicy.java +5 −2 Original line number Diff line number Diff line Loading @@ -2192,10 +2192,13 @@ public class DisplayPolicy { final boolean attachedInParent = attached != null && !layoutInScreen; final boolean requestedFullscreen = (fl & FLAG_FULLSCREEN) != 0 || (requestedSysUiFl & View.SYSTEM_UI_FLAG_FULLSCREEN) != 0 || !win.getClientInsetsState().getSource(ITYPE_STATUS_BAR).isVisible(); || (ViewRootImpl.sNewInsetsMode == NEW_INSETS_MODE_FULL && !win.getRequestedInsetsState().getSource(ITYPE_STATUS_BAR).isVisible()); final boolean requestedHideNavigation = (requestedSysUiFl & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) != 0 || !win.getClientInsetsState().getSource(ITYPE_NAVIGATION_BAR).isVisible(); || (ViewRootImpl.sNewInsetsMode == NEW_INSETS_MODE_FULL && !win.getRequestedInsetsState().getSource(ITYPE_NAVIGATION_BAR) .isVisible()); // TYPE_BASE_APPLICATION windows are never considered floating here because they don't get // cropped / shifted to the displayFrame in WindowState. Loading
services/core/java/com/android/server/wm/InsetsPolicy.java +3 −2 Original line number Diff line number Diff line Loading @@ -66,10 +66,11 @@ class InsetsPolicy { } mStatusBar.setVisible(focusedWin == null || focusedWin != getStatusControlTarget(focusedWin) || focusedWin.getClientInsetsState().getSource(ITYPE_STATUS_BAR).isVisible()); || focusedWin.getRequestedInsetsState().getSource(ITYPE_STATUS_BAR).isVisible()); mNavBar.setVisible(focusedWin == null || focusedWin != getNavControlTarget(focusedWin) || focusedWin.getClientInsetsState().getSource(ITYPE_NAVIGATION_BAR).isVisible()); || focusedWin.getRequestedInsetsState().getSource(ITYPE_NAVIGATION_BAR) .isVisible()); } boolean isHidden(@InternalInsetsType int type) { Loading
services/core/java/com/android/server/wm/Session.java +1 −1 Original line number Diff line number Diff line Loading @@ -463,7 +463,7 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { final WindowState windowState = mService.windowForClientLocked(this, window, false /* throwOnError */); if (windowState != null) { windowState.setClientInsetsState(state); windowState.updateRequestedInsetsState(state); windowState.getDisplayContent().getInsetsPolicy().onInsetsModified( windowState, state); } Loading