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

Commit 40aa6d94 authored by Josh Tsuji's avatar Josh Tsuji
Browse files

Return to OCCLUDED from canceled swipe if needed.

An edge case of a canceled screen off, followed by a partial swipe up to PRIMARY_BOUNCER, followed by a slightly late call to setOccluded=true resulted in the lockscreen overlapping the occluding app until a screen off.

Tests in a follow-up CL (really!) because there are no existing tests for the dragging transition and it's a fairly large change to add support for that.

Bug: 370177430
Test: manual/shortly
Flag: EXEMPT bugfix
Change-Id: I6af8b473756e43ebccecbccdd6c97d8d082ef912
parent f5429b94
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -189,6 +189,7 @@ constructor(
                    internalTransitionInteractor.currentTransitionInfoInternal,
                    keyguardInteractor.statusBarState,
                    keyguardInteractor.isKeyguardDismissible,
                    keyguardInteractor.isKeyguardOccluded,
                )
                .collect {
                    (
@@ -196,7 +197,8 @@ constructor(
                        startedStep,
                        currentTransitionInfo,
                        statusBarState,
                        isKeyguardUnlocked) ->
                        isKeyguardUnlocked,
                        isKeyguardOccluded) ->
                    val id = transitionId
                    if (id != null) {
                        if (startedStep.to == KeyguardState.PRIMARY_BOUNCER) {
@@ -236,9 +238,13 @@ constructor(
                            if (nextState == TransitionState.CANCELED) {
                                transitionRepository.startTransition(
                                    TransitionInfo(
                                        ownerName = name,
                                        ownerName =
                                            "$name " +
                                                "(on behalf of FromPrimaryBouncerInteractor)",
                                        from = KeyguardState.PRIMARY_BOUNCER,
                                        to = KeyguardState.LOCKSCREEN,
                                        to =
                                            if (isKeyguardOccluded) KeyguardState.OCCLUDED
                                            else KeyguardState.LOCKSCREEN,
                                        modeOnCanceled = TransitionModeOnCanceled.REVERSE,
                                        animator =
                                            getDefaultAnimatorForTransitionsToState(