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

Commit 95f7388f authored by Will Leshner's avatar Will Leshner Committed by Android (Google) Code Review
Browse files

Merge "Fix DreamOverlayContainerViewControllerTests." into main

parents 5ab40d3a 668918cc
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.systemui.dreams;

import static kotlinx.coroutines.flow.FlowKt.emptyFlow;
import static kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow;

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
@@ -148,6 +149,8 @@ public class DreamOverlayContainerViewControllerTest extends SysuiTestCase {
        when(mDreamOverlayContainerView.getRootSurfaceControl())
                .thenReturn(mAttachedSurfaceControl);
        when(mKeyguardTransitionInteractor.isFinishedInStateWhere(any())).thenReturn(emptyFlow());
        when(mShadeInteractor.isAnyExpanded()).thenReturn(MutableStateFlow(false));
        when(mCommunalInteractor.isCommunalShowing()).thenReturn(MutableStateFlow(false));

        mController = new DreamOverlayContainerViewController(
                mDreamOverlayContainerView,
@@ -330,4 +333,12 @@ public class DreamOverlayContainerViewControllerTest extends SysuiTestCase {
        mController.onViewDetached();
        verify(mBouncerlessScrimController).removeCallback(any());
    }

    @EnableFlags(android.service.dreams.Flags.FLAG_DREAM_HANDLES_BEING_OBSCURED)
    @Test
    public void testOnViewAttachedSucceedsWhenDreamHandlesBeingObscuredFlagEnabled() {
        // This test will catch failures in presubmit when the dream_handles_being_obscured flag is
        // enabled.
        mController.onViewAttached();
    }
}