Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1340543 authored by Tiger Huang's avatar Tiger Huang Committed by Android (Google) Code Review
Browse files

Merge "Let InsetsStateController apply mPendingControlTarget" into main

parents a6804e3f a6c2ad9f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -198,7 +198,7 @@ class InsetsSourceProvider {
            if (mControllable) {
                mWindowContainer.setControllableInsetProvider(this);
                if (mPendingControlTarget != mControlTarget) {
                    updateControlForTarget(mPendingControlTarget, true /* force */);
                    mStateController.notifyControlTargetChanged(mPendingControlTarget, this);
                }
            }
        }
+11 −0
Original line number Diff line number Diff line
@@ -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");