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

Commit 79d749e0 authored by Beverly's avatar Beverly Committed by Beverly Tai
Browse files

[flexi] Test only calls onDisplayBlanked when SceneContainer disabled

onDisplayBlanked doesn't get called when the SceneContainer
flag is enabled. Add a SceneContainer.isEnabled check
in the test to better reflect what actually happens.

Flag: com.android.systemui.scene_container
Test: atest DozeScrimControllerTest
Fixes: 416709457
Bug: 354910543
Change-Id: I18b92802d981b366332962f7a1faace456c383e3
parent 6129796b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import com.android.systemui.SysuiTestCase;
import com.android.systemui.doze.DozeHost;
import com.android.systemui.doze.DozeLog;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.scene.shared.flag.SceneContainerFlag;

import org.junit.Before;
import org.junit.Test;
@@ -64,7 +65,9 @@ public class DozeScrimControllerTest extends SysuiTestCase {

        // Manually simulate a scrim lifecycle
        mDozeScrimController.getScrimCallback().onStart();
        if (!SceneContainerFlag.isEnabled()) {
            mDozeScrimController.getScrimCallback().onDisplayBlanked();
        }
        mDozeScrimController.getScrimCallback().onFinished();

        verify(callback).onPulseStarted();