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

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

Don't call maybeTransitionToOccluded when the bouncer shows.

This should only be called when the bouncer is no longer showing. This causes bugs when we try to open the bouncer while OCCLUDED.

Also, adjust timing since 0.5f is way too long to wait after hiding bouncer.

Bug: 278086361
Flag: com.android.systemui.keyguard_wm_state_refactor
Test: atest SystemUITests
Change-Id: Ifabf2303803daed3221ceb5517cc1a0211609808
parent 72eb4a3f
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -113,14 +113,18 @@ constructor(
                        keyguardInteractor.isActiveDreamLockscreenHosted,
                        communalSceneInteractor.isIdleOnCommunal
                    )
                    .filterRelevantKeyguardState()
                    .collect {
                        (isBouncerShowing, isAwake, isActiveDreamLockscreenHosted, isIdleOnCommunal)
                        ->
                    .filterRelevantKeyguardStateAnd { (isBouncerShowing, _, _, _) ->
                        // TODO(b/307976454) - See if we need to listen for SHOW_WHEN_LOCKED
                        // activities showing up over the bouncer. Camera launch can't show up over
                        // bouncer since the first power press hides bouncer. Do occluding
                        // activities auto hide bouncer? Not sure.
                        !isBouncerShowing
                    }
                    .collect { (_, isAwake, isActiveDreamLockscreenHosted, isIdleOnCommunal) ->
                        if (
                            !maybeStartTransitionToOccludedOrInsecureCamera { state, reason ->
                                startTransitionTo(state, ownerReason = reason)
                            } && !isBouncerShowing && isAwake && !isActiveDreamLockscreenHosted
                            } && isAwake && !isActiveDreamLockscreenHosted
                        ) {
                            val toState =
                                if (isIdleOnCommunal) {
@@ -258,6 +262,6 @@ constructor(
        val TO_GONE_SHORT_DURATION = 200.milliseconds
        val TO_LOCKSCREEN_DURATION = 450.milliseconds
        val TO_GLANCEABLE_HUB_DURATION = DEFAULT_DURATION
        val TO_GONE_SURFACE_BEHIND_VISIBLE_THRESHOLD = 0.5f
        val TO_GONE_SURFACE_BEHIND_VISIBLE_THRESHOLD = 0.1f
    }
}