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

Commit 85be9f7c authored by Josh Tsuji's avatar Josh Tsuji Committed by Android (Google) Code Review
Browse files

Merge "Don't call maybeTransitionToOccluded when the bouncer shows." into main

parents d8ff6fb6 b0c86a55
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -112,14 +112,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) {
@@ -254,6 +258,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
    }
}