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

Commit 4d89d990 authored by Josh Tsuji's avatar Josh Tsuji
Browse files

Disable unlocked screen off when the panel is expanded.

This is a partial revert of ag/33149508, but retains that CL's change that allows the screen off animation to run when keyguard is rotated.

This caused an issue when the screen off animation was canceled when the following conditions are met:
- Shade is open
- Screen off animation is cancelled partway through
- Device is not locked on the power button press ('power button locks instantly is disabled', smart unlock keeps device unlocked, etc.)

Doing so returned to GONE but with the notification scrim stuck showing over the unlocked content. Additionally, the first time you pull down the shade, it stutters the entire time until you finish expanding or collapsing it.

I spent two days trying to figure out why it does that (after Rahul spent a week on it) and have not been successful. This is the safest fix since it is a partial revert.

Bug: 414874982
Test: disable 'power button locks instantly', pull down shade, cancel screen off
Flag: EXEMPT bugfix/rollback
Change-Id: Ia33553366aa2dc43302fe24bc612a3de3ba81046
parent fc17ba01
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -346,6 +346,19 @@ constructor(
            return false
        }

        // We currently draw both the light reveal scrim, and the AOD UI, in the shade. If it's
        // already expanded and showing notifications/QS, the animation looks really messy. For now,
        // disable it if the notification panel is expanded.
        if (
            (!this::centralSurfaces.isInitialized ||
                panelExpansionInteractorLazy.get().isPanelExpanded) &&
                // Status bar might be expanded because we have started
                // playing the animation already
                !isAnimationPlaying()
        ) {
            return false
        }

        // We only play the unlocked screen off animation if we are... unlocked.
        if (statusBarStateControllerImpl.state != StatusBarState.SHADE) {
            return false