Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +1 −2 Original line number Diff line number Diff line Loading @@ -4889,8 +4889,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { final int adjust = sim & SOFT_INPUT_MASK_ADJUST; final boolean requestedFullscreen = (fl & FLAG_FULLSCREEN) != 0 || (requestedSysUiFl & View.SYSTEM_UI_FLAG_FULLSCREEN) != 0 || (requestedSysUiFl & View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) != 0; || (requestedSysUiFl & View.SYSTEM_UI_FLAG_FULLSCREEN) != 0; final boolean layoutInScreen = (fl & FLAG_LAYOUT_IN_SCREEN) == FLAG_LAYOUT_IN_SCREEN; final boolean layoutInsetDecor = (fl & FLAG_LAYOUT_INSET_DECOR) == FLAG_LAYOUT_INSET_DECOR; Loading services/core/java/com/android/server/wm/AppWindowToken.java +3 −3 Original line number Diff line number Diff line Loading @@ -1427,13 +1427,13 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree mLetterbox.setDimensions(mPendingTransaction, getParent().getBounds(), w.mFrame); } else if (mLetterbox != null) { final SurfaceControl.Transaction t = new SurfaceControl.Transaction(); // Make sure we have a transaction here, in case we're called outside of a transaction. // This does not use mPendingTransaction, because SurfaceAnimator uses a // global transaction in onAnimationEnd. SurfaceControl.openTransaction(); try { mLetterbox.hide(t); } finally { // TODO: This should use pendingTransaction eventually, but right now things // happening on the animation finished callback are happening on the global // transaction. SurfaceControl.mergeToGlobalTransaction(t); SurfaceControl.closeTransaction(); } Loading services/core/java/com/android/server/wm/WindowState.java +1 −2 Original line number Diff line number Diff line Loading @@ -3002,8 +3002,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP // Letterbox if any fullscreen mode is set. final int fl = mAttrs.flags; final int sysui = mSystemUiVisibility; return (fl & FLAG_FULLSCREEN) != 0 || (sysui & (SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | SYSTEM_UI_FLAG_FULLSCREEN)) != 0; return (fl & FLAG_FULLSCREEN) != 0 || (sysui & (SYSTEM_UI_FLAG_FULLSCREEN)) != 0; } boolean isDragResizeChanged() { Loading services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerLayoutTest.java +19 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.server.policy; import static android.view.Surface.ROTATION_180; import static android.view.Surface.ROTATION_270; import static android.view.Surface.ROTATION_90; import static android.view.View.SYSTEM_UI_FLAG_FULLSCREEN; import static android.view.View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN; import static android.view.ViewGroup.LayoutParams.MATCH_PARENT; import static android.view.WindowManager.LayoutParams.FLAG2_LAYOUT_IN_DISPLAY_CUTOUT_AREA; Loading Loading @@ -128,7 +129,7 @@ public class PhoneWindowManagerLayoutTest extends PhoneWindowManagerTestBase { } @Test public void layoutWindowLw_withDisplayCutout_fullscreen() { public void layoutWindowLw_withDisplayCutout_layoutFullscreen() { addDisplayCutout(); mAppWindow.attrs.subtreeSystemUiVisibility |= SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN; Loading @@ -137,6 +138,22 @@ public class PhoneWindowManagerLayoutTest extends PhoneWindowManagerTestBase { mPolicy.beginLayoutLw(mFrames, 0 /* UI mode */); mPolicy.layoutWindowLw(mAppWindow, null, mFrames); assertInsetByTopBottom(mAppWindow.parentFrame, 0, 0); assertInsetByTopBottom(mAppWindow.stableFrame, STATUS_BAR_HEIGHT, NAV_BAR_HEIGHT); assertInsetByTopBottom(mAppWindow.contentFrame, STATUS_BAR_HEIGHT, NAV_BAR_HEIGHT); assertInsetByTopBottom(mAppWindow.decorFrame, 0, 0); } @Test public void layoutWindowLw_withDisplayCutout_fullscreen() { addDisplayCutout(); mAppWindow.attrs.subtreeSystemUiVisibility |= SYSTEM_UI_FLAG_FULLSCREEN; mPolicy.addWindow(mAppWindow); mPolicy.beginLayoutLw(mFrames, 0 /* UI mode */); mPolicy.layoutWindowLw(mAppWindow, null, mFrames); assertInsetByTopBottom(mAppWindow.parentFrame, STATUS_BAR_HEIGHT, 0); assertInsetByTopBottom(mAppWindow.stableFrame, STATUS_BAR_HEIGHT, NAV_BAR_HEIGHT); assertInsetByTopBottom(mAppWindow.contentFrame, STATUS_BAR_HEIGHT, NAV_BAR_HEIGHT); Loading @@ -147,7 +164,7 @@ public class PhoneWindowManagerLayoutTest extends PhoneWindowManagerTestBase { public void layoutWindowLw_withDisplayCutout_fullscreenInCutout() { addDisplayCutout(); mAppWindow.attrs.subtreeSystemUiVisibility |= SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN; mAppWindow.attrs.subtreeSystemUiVisibility |= SYSTEM_UI_FLAG_FULLSCREEN; mAppWindow.attrs.flags2 |= FLAG2_LAYOUT_IN_DISPLAY_CUTOUT_AREA; mPolicy.addWindow(mAppWindow); Loading Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +1 −2 Original line number Diff line number Diff line Loading @@ -4889,8 +4889,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { final int adjust = sim & SOFT_INPUT_MASK_ADJUST; final boolean requestedFullscreen = (fl & FLAG_FULLSCREEN) != 0 || (requestedSysUiFl & View.SYSTEM_UI_FLAG_FULLSCREEN) != 0 || (requestedSysUiFl & View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) != 0; || (requestedSysUiFl & View.SYSTEM_UI_FLAG_FULLSCREEN) != 0; final boolean layoutInScreen = (fl & FLAG_LAYOUT_IN_SCREEN) == FLAG_LAYOUT_IN_SCREEN; final boolean layoutInsetDecor = (fl & FLAG_LAYOUT_INSET_DECOR) == FLAG_LAYOUT_INSET_DECOR; Loading
services/core/java/com/android/server/wm/AppWindowToken.java +3 −3 Original line number Diff line number Diff line Loading @@ -1427,13 +1427,13 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree mLetterbox.setDimensions(mPendingTransaction, getParent().getBounds(), w.mFrame); } else if (mLetterbox != null) { final SurfaceControl.Transaction t = new SurfaceControl.Transaction(); // Make sure we have a transaction here, in case we're called outside of a transaction. // This does not use mPendingTransaction, because SurfaceAnimator uses a // global transaction in onAnimationEnd. SurfaceControl.openTransaction(); try { mLetterbox.hide(t); } finally { // TODO: This should use pendingTransaction eventually, but right now things // happening on the animation finished callback are happening on the global // transaction. SurfaceControl.mergeToGlobalTransaction(t); SurfaceControl.closeTransaction(); } Loading
services/core/java/com/android/server/wm/WindowState.java +1 −2 Original line number Diff line number Diff line Loading @@ -3002,8 +3002,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP // Letterbox if any fullscreen mode is set. final int fl = mAttrs.flags; final int sysui = mSystemUiVisibility; return (fl & FLAG_FULLSCREEN) != 0 || (sysui & (SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | SYSTEM_UI_FLAG_FULLSCREEN)) != 0; return (fl & FLAG_FULLSCREEN) != 0 || (sysui & (SYSTEM_UI_FLAG_FULLSCREEN)) != 0; } boolean isDragResizeChanged() { Loading
services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerLayoutTest.java +19 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.server.policy; import static android.view.Surface.ROTATION_180; import static android.view.Surface.ROTATION_270; import static android.view.Surface.ROTATION_90; import static android.view.View.SYSTEM_UI_FLAG_FULLSCREEN; import static android.view.View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN; import static android.view.ViewGroup.LayoutParams.MATCH_PARENT; import static android.view.WindowManager.LayoutParams.FLAG2_LAYOUT_IN_DISPLAY_CUTOUT_AREA; Loading Loading @@ -128,7 +129,7 @@ public class PhoneWindowManagerLayoutTest extends PhoneWindowManagerTestBase { } @Test public void layoutWindowLw_withDisplayCutout_fullscreen() { public void layoutWindowLw_withDisplayCutout_layoutFullscreen() { addDisplayCutout(); mAppWindow.attrs.subtreeSystemUiVisibility |= SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN; Loading @@ -137,6 +138,22 @@ public class PhoneWindowManagerLayoutTest extends PhoneWindowManagerTestBase { mPolicy.beginLayoutLw(mFrames, 0 /* UI mode */); mPolicy.layoutWindowLw(mAppWindow, null, mFrames); assertInsetByTopBottom(mAppWindow.parentFrame, 0, 0); assertInsetByTopBottom(mAppWindow.stableFrame, STATUS_BAR_HEIGHT, NAV_BAR_HEIGHT); assertInsetByTopBottom(mAppWindow.contentFrame, STATUS_BAR_HEIGHT, NAV_BAR_HEIGHT); assertInsetByTopBottom(mAppWindow.decorFrame, 0, 0); } @Test public void layoutWindowLw_withDisplayCutout_fullscreen() { addDisplayCutout(); mAppWindow.attrs.subtreeSystemUiVisibility |= SYSTEM_UI_FLAG_FULLSCREEN; mPolicy.addWindow(mAppWindow); mPolicy.beginLayoutLw(mFrames, 0 /* UI mode */); mPolicy.layoutWindowLw(mAppWindow, null, mFrames); assertInsetByTopBottom(mAppWindow.parentFrame, STATUS_BAR_HEIGHT, 0); assertInsetByTopBottom(mAppWindow.stableFrame, STATUS_BAR_HEIGHT, NAV_BAR_HEIGHT); assertInsetByTopBottom(mAppWindow.contentFrame, STATUS_BAR_HEIGHT, NAV_BAR_HEIGHT); Loading @@ -147,7 +164,7 @@ public class PhoneWindowManagerLayoutTest extends PhoneWindowManagerTestBase { public void layoutWindowLw_withDisplayCutout_fullscreenInCutout() { addDisplayCutout(); mAppWindow.attrs.subtreeSystemUiVisibility |= SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN; mAppWindow.attrs.subtreeSystemUiVisibility |= SYSTEM_UI_FLAG_FULLSCREEN; mAppWindow.attrs.flags2 |= FLAG2_LAYOUT_IN_DISPLAY_CUTOUT_AREA; mPolicy.addWindow(mAppWindow); Loading