diff options
Diffstat (limited to 'services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java')
-rw-r--r-- | services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java index e8f343e73256..20935f1d199e 100644 --- a/services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java @@ -927,6 +927,15 @@ public class WindowStateTests extends WindowTestsBase { assertTrue(app.isReadyToDispatchInsetsState()); mDisplayContent.getInsetsStateController().notifyInsetsChanged(); verify(app).notifyInsetsChanged(); + + // Verify that invisible non-activity window won't dispatch insets changed. + final WindowState overlay = createWindow(null, TYPE_APPLICATION_OVERLAY, "overlay"); + makeWindowVisible(overlay); + assertTrue(overlay.isReadyToDispatchInsetsState()); + overlay.mHasSurface = false; + assertFalse(overlay.isReadyToDispatchInsetsState()); + mDisplayContent.getInsetsStateController().notifyInsetsChanged(); + assertFalse(overlay.getWindowFrames().hasInsetsChanged()); } @UseTestDisplay(addWindows = {W_INPUT_METHOD, W_ACTIVITY}) |