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

Commit d629fab3 authored by Justin Weir's avatar Justin Weir
Browse files

Make QS listen when expanded over Lockscreen

QS needs to be told to listen for tile state changes whenever shade
expansion state changes. This change adds a call to QS.setListening
when it changes the state of System UI to SHADE_LOCKED.

Fixes: 403434908
Test: Manually reproduced bug and verified fix
Test: added unit test coverage
Flag: EXEMPT tiny bug fix
Change-Id: I4060591dd50d44f30c8f776d1908ff6b9d511611
parent 1479637e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -608,6 +608,7 @@ constructor(
                isWakingToShadeLocked = true
            }
            statusBarStateController.setState(StatusBarState.SHADE_LOCKED)
            qS?.setListening(true)
            // This call needs to be after updating the shade state since otherwise
            // the scrimstate resets too early
            if (animationHandler != null) {
+2 −3
Original line number Diff line number Diff line
@@ -54,7 +54,6 @@ import org.mockito.ArgumentMatchers.anyLong
import org.mockito.ArgumentMatchers.eq
import org.mockito.ArgumentMatchers.isNull
import org.mockito.Mock
import org.mockito.Mockito
import org.mockito.Mockito.clearInvocations
import org.mockito.Mockito.never
import org.mockito.Mockito.verify
@@ -203,6 +202,7 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() {
        testScope.runTest {
            transitionController.goToLockedShade(null)
            verify(statusbarStateController).setState(StatusBarState.SHADE_LOCKED)
            verify(qS).setListening(true)
        }

    @Test
@@ -261,8 +261,7 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() {
            transitionController.goToLockedShade(null)
            verify(statusbarStateController, never()).setState(anyInt())
            verify(statusbarStateController).setLeaveOpenOnKeyguardHide(true)
            verify(centralSurfaces)
                .showBouncerWithDimissAndCancelIfKeyguard(nullable(), nullable())
            verify(centralSurfaces).showBouncerWithDimissAndCancelIfKeyguard(nullable(), nullable())
        }

    @Test