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

Commit dd2f7284 authored by Behnam Heydarshahi's avatar Behnam Heydarshahi
Browse files

Instantly collapse shade on shutdown ui

This avoids animations that were increasing shutdown time.

Bug: 410161380
Flag: EXEMPT bugfix
Test: atest GlobalActionsImplTest

Change-Id: I05f3cb0fc544752f110b202827835ec72e646e88
parent cb71f42d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ public class GlobalActionsImpl implements GlobalActions, CommandQueue.Callbacks
    @Override
    public void showShutdownUi(boolean isReboot, String reason) {
        mShutdownUi.showShutdownUi(isReboot, reason);
        mShadeController.collapseShade();
        mShadeController.instantCollapseShade();
    }
    @Override
    public void disable(int displayId, int state1, int state2, boolean animate) {
+2 −2
Original line number Diff line number Diff line
@@ -55,13 +55,13 @@ class GlobalActionsImplTest : SysuiTestCase() {
    fun testShutdown_collapsesShade() {
        underTest.showShutdownUi(false, "test")

        verify(shadeController).collapseShade()
        verify(shadeController).instantCollapseShade()
    }

    @Test
    fun testReboot_collapsesShade() {
        underTest.showShutdownUi(true, "test")

        verify(shadeController).collapseShade()
        verify(shadeController).instantCollapseShade()
    }
}