Loading services/core/java/com/android/server/wm/InsetsSourceProvider.java +1 −1 Original line number Diff line number Diff line Loading @@ -198,7 +198,7 @@ class InsetsSourceProvider { if (mControllable) { mWindowContainer.setControllableInsetProvider(this); if (mPendingControlTarget != mControlTarget) { updateControlForTarget(mPendingControlTarget, true /* force */); mStateController.notifyControlTargetChanged(mPendingControlTarget, this); } } } Loading services/tests/wmtests/src/com/android/server/wm/InsetsStateControllerTest.java +11 −0 Original line number Diff line number Diff line Loading @@ -352,6 +352,17 @@ public class InsetsStateControllerTest extends WindowTestsBase { assertNull(getController().getControlsForDispatch(app)); } @Test public void testControlTargetChangedWhileProviderHasNoWindow() { final WindowState app = createWindow(null, TYPE_APPLICATION, "app"); final InsetsSourceProvider provider = getController().getOrCreateSourceProvider( ID_STATUS_BAR, statusBars()); getController().onBarControlTargetChanged(app, null, null, null); assertNull(getController().getControlsForDispatch(app)); provider.setWindowContainer(createWindow(null, TYPE_APPLICATION, "statusBar"), null, null); assertNotNull(getController().getControlsForDispatch(app)); } @Test public void testTransientVisibilityOfFixedRotationState() { final WindowState statusBar = createWindow(null, TYPE_APPLICATION, "statusBar"); Loading Loading
services/core/java/com/android/server/wm/InsetsSourceProvider.java +1 −1 Original line number Diff line number Diff line Loading @@ -198,7 +198,7 @@ class InsetsSourceProvider { if (mControllable) { mWindowContainer.setControllableInsetProvider(this); if (mPendingControlTarget != mControlTarget) { updateControlForTarget(mPendingControlTarget, true /* force */); mStateController.notifyControlTargetChanged(mPendingControlTarget, this); } } } Loading
services/tests/wmtests/src/com/android/server/wm/InsetsStateControllerTest.java +11 −0 Original line number Diff line number Diff line Loading @@ -352,6 +352,17 @@ public class InsetsStateControllerTest extends WindowTestsBase { assertNull(getController().getControlsForDispatch(app)); } @Test public void testControlTargetChangedWhileProviderHasNoWindow() { final WindowState app = createWindow(null, TYPE_APPLICATION, "app"); final InsetsSourceProvider provider = getController().getOrCreateSourceProvider( ID_STATUS_BAR, statusBars()); getController().onBarControlTargetChanged(app, null, null, null); assertNull(getController().getControlsForDispatch(app)); provider.setWindowContainer(createWindow(null, TYPE_APPLICATION, "statusBar"), null, null); assertNotNull(getController().getControlsForDispatch(app)); } @Test public void testTransientVisibilityOfFixedRotationState() { final WindowState statusBar = createWindow(null, TYPE_APPLICATION, "statusBar"); Loading