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

Commit 203def72 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix isOccludedByApp to exclude when occluded by communal (a non-app)." into main

parents 8b16ba06 d24ced25
Loading
Loading
Loading
Loading
+10 −3
Original line number Original line Diff line number Diff line
@@ -70,7 +70,14 @@ constructor(
) {
) {
    private val keyguardOccludedByApp: Flow<Boolean> =
    private val keyguardOccludedByApp: Flow<Boolean> =
        if (KeyguardWmStateRefactor.isEnabled) {
        if (KeyguardWmStateRefactor.isEnabled) {
            keyguardTransitionInteractor.currentKeyguardState.map { it == KeyguardState.OCCLUDED }
            combine(
                    keyguardTransitionInteractor.currentKeyguardState,
                    communalSceneInteractor.isIdleOnCommunal,
                    ::Pair,
                )
                .map { (currentState, isIdleOnCommunal) ->
                    currentState == KeyguardState.OCCLUDED && !isIdleOnCommunal
                }
        } else {
        } else {
            combine(
            combine(
                    keyguardInteractor.isKeyguardOccluded,
                    keyguardInteractor.isKeyguardOccluded,
@@ -120,7 +127,7 @@ constructor(
            // On fingerprint success when the screen is on and not dreaming, go to the home screen
            // On fingerprint success when the screen is on and not dreaming, go to the home screen
            fingerprintUnlockSuccessEvents
            fingerprintUnlockSuccessEvents
                .sample(
                .sample(
                    combine(powerInteractor.isInteractive, keyguardInteractor.isDreaming, ::Pair),
                    combine(powerInteractor.isInteractive, keyguardInteractor.isDreaming, ::Pair)
                )
                )
                .collect { (interactive, dreaming) ->
                .collect { (interactive, dreaming) ->
                    if (interactive && !dreaming) {
                    if (interactive && !dreaming) {
@@ -148,7 +155,7 @@ constructor(
                        }
                        }
                    },
                    },
                    /* cancel= */ null,
                    /* cancel= */ null,
                    /* afterKeyguardGone */ false
                    /* afterKeyguardGone */ false,
                )
                )
            }
            }
        }
        }