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

Commit d37a55d3 authored by Josh Tsuji's avatar Josh Tsuji
Browse files

Use non-deprecated method to check shade expansion.

Some combination of UMO, shade expansion, and lock/unlock can get us into a state where isPanelExpanded returns the inverse value of actual shade expansion. This results in us controlling the screen off animation when we're not expecting to, resulting in unpredictable jank as well as unlocked app content remaining visible at unexpected times during the screen off animation.

I don't know why this happens, but that method is deprecated, and updateControlScreenOff() is initially triggered by the SbStateController mIsExpanded updating, so we should just query that value for consistency.

Fixes: 437490510
Test: manual, I figured out how to repro sometimes and confirmed that reaching that same state with this fix fixes it
Flag: EXEMPT bugfix
Change-Id: Ic31e5c14fe371370c67b4b12c31ac62eb40dd32f
parent c709ea04
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -32,7 +32,8 @@ interface PanelExpansionInteractor {
     * Returns whether the shade height is greater than zero or the shade is expecting a synthesized
     * down event.
     */
    @Deprecated("Use ShadeInteractor.isAnyExpanded instead.") val isPanelExpanded: Boolean
    @Deprecated("Legitimately deprecated and broken. Use ShadeInteractor.isAnyExpanded instead.")
    val isPanelExpanded: Boolean

    /**
     * This method should not be used anymore, you should probably use [.isShadeFullyOpen] instead.
+1 −2
Original line number Diff line number Diff line
@@ -353,8 +353,7 @@ constructor(
        // 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) &&
            (!this::centralSurfaces.isInitialized || statusBarStateControllerImpl.isExpanded) &&
                // Status bar might be expanded because we have started
                // playing the animation already
                !isAnimationPlaying()