From 963c5c29bf495aba7351398972393c4ebfd9f7fd Mon Sep 17 00:00:00 2001 From: Jorim Jaggi Date: Wed, 1 Apr 2020 22:53:42 +0200 Subject: [PATCH] Fix broken test on devices with cutout Asserting count to be 0 doesn't make a lot of sense since they might be inset source the test isn't considering (cutout...) Bug: 0 Test: self Change-Id: I36db7b0cd7ab79d80395cd04f76322c153159f44 --- .../src/com/android/server/wm/InsetsStateControllerTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/tests/wmtests/src/com/android/server/wm/InsetsStateControllerTest.java b/services/tests/wmtests/src/com/android/server/wm/InsetsStateControllerTest.java index db7bce4c87530..5d25ca95208c3 100644 --- a/services/tests/wmtests/src/com/android/server/wm/InsetsStateControllerTest.java +++ b/services/tests/wmtests/src/com/android/server/wm/InsetsStateControllerTest.java @@ -102,7 +102,8 @@ public class InsetsStateControllerTest extends WindowTestsBase { getController().getSourceProvider(ITYPE_STATUS_BAR).setWindow(statusBar, null, null); getController().getSourceProvider(ITYPE_NAVIGATION_BAR).setWindow(navBar, null, null); getController().getSourceProvider(ITYPE_IME).setWindow(ime, null, null); - assertEquals(0, getController().getInsetsForDispatch(navBar).getSourcesCount()); + assertNull(getController().getInsetsForDispatch(navBar).peekSource(ITYPE_IME)); + assertNull(getController().getInsetsForDispatch(navBar).peekSource(ITYPE_STATUS_BAR)); } @Test